JDK-4682386 : SwingPropertyChangeSupport and PropertyChangeSupport refactor project
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows_xp
  • CPU: x86
  • Submitted: 2002-05-09
  • Updated: 2017-05-16
  • Resolved: 2003-07-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Relates :  
Description

Name: gm110360			Date: 05/09/2002


FULL PRODUCT VERSION :
All 1.3.x and 1.4

FULL OPERATING SYSTEM VERSION :

ALL PLATFORMS

A DESCRIPTION OF THE PROBLEM :
javax.swing.event.SwingPropertyChangeSupport shall NOT
extend java.beans.PropertyChangeSupport. Not a single
method or field of PCS is acually used.

1) It's a useless waste of memory (12 bytes per
object). //Btw, SPCS JavaDocs are claim that Swing
cares about memory usage.

2) The "extends"  is just plainly wrong here by OO
concepts. No extension of any functionality takes place.
It's just a completely different utility class.

This bug can be reproduced always.
(Review ID: 145847) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b11
14-06-2004

EVALUATION The only real difference between the PropertyChangeSupport and SwingPropertyChangeSupport is that that the SPCS uses an EventListenerList while the PCS uses a Vector to hold the listeners. At first glance, I can't see the advantages of using the EventListener list since the all the listeners are PropertyChangeListeners. Perhaps this these two classes should be refactored and consolidated. See 4528354 for other consolidation in PCS. ---- I've completed most of the design for this project. It seems feasable to implement this and get the same functionality yet gain a maintenace win and potentialy better performance in both PropertyChangeSuport and SwingPropertyChangeSupport. The reconciliation between the EventListenerList and the Vector can be achieved by using an ArrayList and syncronizing it when the PropertyChangeSupport constructor is called. The changes should be transparent to classes which use the PropertyChange notification mechanism. ###@###.### 2003-03-26
26-03-2003