JDK-7190416 : JSR 292: typo in InvokerBytecodeGenerator.getConstantPoolSize
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: hs23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-09
  • Updated: 2014-02-10
  • Resolved: 2012-08-13
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
7u40Fixed 8 b46Fixed
Related Reports
Relates :  
Description
There is a small typo in InvokerBytecodeGenerator.getConstantPoolSize which may cause failures of various kinds.

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

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/e1d063685dc8
10-08-2012

SUGGESTED FIX diff --git a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java --- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java @@ -230,7 +230,7 @@ // u2 minor_version; // u2 major_version; // u2 constant_pool_count; - return ((classFile[8] << 8) & 0xFF) | ( classFile[9] & 0xFF); + return ((classFile[8] & 0xFF) << 8) | (classFile[9] & 0xFF); } /**
09-08-2012