JDK-8161039 : System.getProperty("os.version") returns incorrect version number on Mac
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2016-07-08
  • Updated: 2017-11-29
  • Resolved: 2016-07-21
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 8 JDK 9
8u152Fixed 9 b129Fixed
Related Reports
Relates :  
Relates :  
Description
With the fix of JDK-8160370
java/lang/System/OsVersionTest.java still fail at some version of MacOS

$  sw_vers -productVersion 
10.11

Test fail with:
STDERR:
java.lang.Error: 10.11.0 != 10.11
	at OsVersionTest.main(OsVersionTest.java:52)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

Comments
Amy, can you confirm that this test passed on the same machine using b124 or earlier?
19-07-2016