Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8161039

System.getProperty("os.version") returns incorrect version number on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • b129
    • os_x

        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)

              bchristi Brent Christian
              amlu Amy Lu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: