JDK-6574090 : Remove unnecessary synchronization of readObject methods
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.math
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-06-26
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
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.
JDK 7
7 b16Fixed
Related Reports
Relates :  
Description
As noted by findbugs, the readObject methods of BigDecimal and MathContext are synchronized.  This is not necessary and the synchronization modifier should be removed.

Comments
SUGGESTED FIX ------- BigDecimal.java ------- 3233c3233 < private synchronized void readObject(java.io.ObjectInputStream s) --- > private void readObject(java.io.ObjectInputStream s) ------- MathContext.java ------- 334c334 < private synchronized void readObject(java.io.ObjectInputStream s) --- > private void readObject(java.io.ObjectInputStream s)
29-06-2007

EVALUATION A fine idea.
26-06-2007