JDK-8165782 : java.util.jar.JarFile.runtimeVersion() spec needs clarification
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-09-09
  • Updated: 2017-05-17
  • Resolved: 2016-11-08
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 b145Fixed
Related Reports
Blocks :  
Description
Specification for the following method
http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/java/util/jar/JarFile.html#runtimeVersion--

says: "In most cases, runtimeVersion() is equal to Runtime.version()"
However by default this is true only for major version numbers so the following test line:

assertEquals( Runtime.version(), JarFile.runtimeVersion() )

will fail with the message like : "Expected equal to : "9-ea+135", was given: "9"" 

The spec deserves to be clarified.