JDK-8030656 : Bad version check for parameter information in src/share/vm/classfile/javaClasses.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25,9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-12-17
  • Updated: 2014-06-26
  • Resolved: 2013-12-26
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 9
9 b02Fixed
Related Reports
Blocks :  
Relates :  
Description
In Java SE 8, various additional information associated with parameters can be stored in a class file, including parameter names and modifiers. With attempts to update JDK_MINOR_VERSION in JDK 9, this code in src/share/vm/classfile/javaClasses.cpp

if (JDK_Version::is_jdk18x_version())
    java_lang_reflect_Parameter::compute_offsets();

seems to improperly limited parameter support to JDK 8 rather than JDK 8 or later.

This is the suspected cause of java.lang.reflect.Parameter test failures in the jdk and langtools repos observed in test builds where JDK_MINOR_VERSION has been incremented to 9.
Comments
Review thread: http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-December/012016.html
18-12-2013

Affected langtools tests Execution failed: `main' threw exception: java.lang.Exception: Test output is not equal with golden file. tools/javac/MethodParameters/AnnotationTest.java: javac should generate method parameters correctly. tools/javac/MethodParameters/AnonymousClass.java: javac should generate method parameters correctly. tools/javac/MethodParameters/Constructors.java: javac should generate method parameters correctly. tools/javac/MethodParameters/EnumTest.java: javac should generate method parameters correctly. tools/javac/MethodParameters/InstanceMethods.java: javac should generate method parameters correctly. tools/javac/MethodParameters/LambdaTest.java: javac should generate method parameters correctly. tools/javac/MethodParameters/LocalClassTest.java: javac should generate method parameters correctly. tools/javac/MethodParameters/MemberClassTest.java: javac should generate method parameters correctly. tools/javac/MethodParameters/StaticMethods.java: javac should generate method parameters correctly. tools/javac/MethodParameters/UncommonParamNames.java: javac should generate method parameters correctly. Execution failed: `main' threw exception: java.lang.NullPointerException tools/javac/MethodParameters/CaptureTest.java: Test method parameter attribute generation with captured locals. Affected jdk tests: Execution failed: `main' threw exception: java.lang.NullPointerException java/lang/reflect/Parameter/GetAnnotatedTypeTest.java: javac should generate method parameters correctly. java/lang/reflect/Parameter/WithParameters.java: javac should generate method parameters correctly. Execution failed: `main' threw exception: java.lang.RuntimeException: 5 errors in test java/lang/reflect/Parameter/BadClassFiles.java: The reflection API should throw the correct exceptions.
17-12-2013