JDK-5005319 : wrapper objects created in wrapper classes are not cached
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 5.0,6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,solaris_8
  • CPU: generic
  • Submitted: 2004-03-01
  • Updated: 2009-10-09
  • Resolved: 2009-10-09
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
7Resolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Almost all occurrences of

	new Integer(

appearing in java/lang/Integer.java should be replaced by

	valueOf(

Similar changes should be made in all other wrapper classes.

Comments
EVALUATION With the fixing of 6480728, the only calls to new in Byte, Short, Integer, and Long are to initialize the autoboxing cache or to return values outside of the cached region. Closing as a duplicate.
09-10-2009

EVALUATION A valid criticism; however, the lack of caching is long-standing and might not be addressed for Tiger. ###@###.### 2004-03-02 Cacheing was implemented with bug 4990346 for boxing; should reexamine this pattern in the wrapper classes. ###@###.### 2004-11-12 01:47:35 GMT
02-03-2004