[ mx4j-Bugs-1031848 ] DescriptorSupport doesn't provide a useful clone imp.

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #1031848, was opened at 2004-09-21 14:24
Message generated for change (Comment added) made by biorn_steedom
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1031848&group_id=47745

>Category: JMX implementation
>Group: Release 2.0.1
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jon Seymour (jonseymour)
>Assigned to: Simone Bordet (biorn_steedom)
Summary: DescriptorSupport doesn't provide a useful clone imp.

Initial Comment:
The JMX specification defines the Descriptor.clone()
method which "returns a new Descriptor instance which
is a duplicate of the [receiving descriptor]."

However, MX4J's implementation of clone doesn't produce
a duplicate which is usefully different from the
original object. In particular, mutations of the new
field values of the cloned descriptor will change the
field values of the source descriptor.

A duplicate defined in this way isn't very useful - one
may as well copy the original object reference instead
of cloning it and so this can't be the intended meaning
of the JMX specification.

----------------------------------------------------------------------

>Comment By: Simone Bordet (biorn_steedom)
Date: 2004-10-05 15:57

Message:
Logged In: YES 
user_id=128193

Fixed by calling the copy constructor from clone()

----------------------------------------------------------------------

Comment By: Jon Seymour (jonseymour)
Date: 2004-09-22 12:03

Message:
Logged In: YES 
user_id=1125728

Another note: the MX4J DescriptorSupport class's clone()
method behaves differently to the reference implementation.
In particular, the reference implementation's
implementations answers an instance constructed with the
copy constructor.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1031848&group_id=47745


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.