Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.1.2
-
Component/s: XML code generator
-
Labels:None
-
Number of attachments :
Description
The classes in the .types. hierarchy have addPropertyChangeListener, removePropertyChangeListener, etc. methods.
These methods are unnecessary, because those objects are essentially immutable.
If those methods are there, code may mistake those objects for Java beans. Applications that automatically add listeners for objects they consider Java beans may then suffer from memory leaks because each object is also referred to from a static variable.
Related, the _type field should be final for better documentation.
See also http://www.mail-archive.com/user@castor.codehaus.org/msg04278.html
Initial patch for review.