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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b129
    • OS:
      os_x

      Backports

        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)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bchristi Brent Christian
                  Reporter:
                  amlu Amy Lu
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: