JDK-7153157 : ClassValue.get does not return if computeValue calls remove
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-12
  • Updated: 2014-10-15
  • Resolved: 2013-10-10
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 JDK 8
7u76Fixed 8 b52Fixed
Related Reports
Duplicate :  
Relates :  
Description
http://mail.openjdk.java.net/pipermail/mlvm-dev/2012-March/004398.html

This snippet creates an infinite loop :(

        java.lang.ClassValue<Integer> cv = new 
java.lang.ClassValue<Integer>() {
             @Override
             protected Integer computeValue(Class<?> type) {
                 remove(int.class);
                 return 1;
             }
         };
         cv.get(int.class);

Comments
http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/05e5ce861a58
10-10-2013

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/jdk/rev/05e5ce861a58
11-08-2012