JDK-6982999 : tools must support -target 7 bytecodes
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-09-08
  • Updated: 2014-10-15
  • Resolved: 2011-05-17
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
7 b128Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The compiler should not crash when reading class files containing JSR 292 constructs.

In particular, the new constant pool entries described here should not cause the ClassReader to crash:

http://cr.openjdk.java.net/~jrose/pres/indy-javadoc-mlvm/

These entries are CONSTANT_InvokeDynamic (decimal 17) of length 5 bytes including tag byte, CONSTANT_MethodType (decimal 16) of length 3 bytes, and CONSTANT_MethodHandle (decimal 15) of length 4 bytes.  None of these constant pool types affect the external API of a classfile, so the compiler's class reader can skip their bytes.


This bug affects the javap command also.  The "-c" mode of javap will want to decode the new constant pool entries.

This bug is similar to one for Pack200 (6981776), which also needs to process the new constant pool entries.

Comments
EVALUATION Javac will be made to skip the new constant pool entries, of course javap must print all the relevent indy CP entries and byte codes.
30-12-2010

SUGGESTED FIX http://hg.openjdk.java.net/mlvm/mlvm/langtools/file/tip/indy-bsm-6964498.patch
08-09-2010