Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4990346
Votes 0
Synopsis wrapper static factories fail to cache as required
Category java:classes_lang
Reported Against tiger-beta
Release Fixed 1.5(tiger-b42)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6352381 , 4993091 , 5006128 , 5005319 , 6628737 , 4931256
Submit Date 06-FEB-2004
Description
The latest boxing spec filed under CCC 4989021 requires an implementation
to cache boxed values in the range -128 to 127.  The following test case
for this property fails, showing that we don't cache.

class CacheBox {
    public static void main(String[] args) {
        Integer i1 = 12;
        Integer i2 = 12;
        if (i1 != i2) throw new Error();
    }
}
Work Around
N/A
Evaluation
Yes, if the returned values have to be == a cache will be necessary.

  xxxxx@xxxxx   2004-02-09
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang