JDK-4741471 : extraneous synchronization in collection serialization
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 1.2.2,1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-09-04
  • Updated: 2021-03-03
  • Resolved: 2002-11-07
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
1.4.2 mantisFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Some unsynchronized collections (ArrayList, LinkedList, HashSet and TreeSet) have synchronized readObject and writeObject methods.  This is of no benefit and could even cause deadlock in applications that concurrently serialize different parts of an object graph in multiple threads.  The synchronized modifier should be removed from these methods.  Further, the synchronized modifier is present on the readObject method of a synchronized collection (Hashtable).  This is unnecessary and should be removed.  (It is, however, essential that Hashtable's writeObject method remain synchronized.)  Finally, Vector uses default serialization, which is unsynchronized.  We must add a synchronized writeObject method to Vector that simply calls the default method.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b07 VERIFIED IN: mantis-beta
14-06-2004

EVALUATION The reporter is correct. ###@###.### 2002-09-04
04-09-2002