United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7190416 JSR 292: typo in InvokerBytecodeGenerator.getConstantPoolSize
JDK-7190416 : JSR 292: typo in InvokerBytecodeGenerator.getConstantPoolSize

Details
Type:
Bug
Submit Date:
2012-08-09
Status:
Resolved
Updated Date:
2014-02-10
Project Name:
JDK
Resolved Date:
2012-08-13
Component:
core-libs
OS:
generic
Sub-Component:
java.lang.invoke
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
There is a small typo in InvokerBytecodeGenerator.getConstantPoolSize which may cause failures of various kinds.

                                    

Comments
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);
     }
 
     /**
                                     
2012-08-09
EVALUATION

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

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



Hardware and Software, Engineered to Work Together