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

jdk.jshell.TaskFactory code for java.specification.version = 1.9 should be adjusted for Verona

    Details

    • Subcomponent:
    • Resolved In Build:
      team

      Backports

        Description

        JEP 223 (http://openjdk.java.net/jeps/223) New Version-String Specification (aka Verona) changes the return value for various system properties including java.specification.version. The code in jdk.jshell.TaskFactory should be altered to detect the new version ("9" instead of "1.9") as follows:

        diff -r 49da3649b796 src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java
        --- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java Fri Oct 30 10:29:03 2015 -0700
        +++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java Sun Nov 01 11:24:58 2015 -0800
        @@ -80,7 +80,7 @@
                 if (compiler == null) {
                     throw new UnsupportedOperationException("Compiler not available, must be run with full JDK 9.");
                 }
        - if (!System.getProperty("java.specification.version").equals("1.9")) {
        + if (!System.getProperty("java.specification.version").equals("9")) {
                     throw new UnsupportedOperationException("Wrong compiler, must be run with full JDK 9.");
                 }
                 this.fileManager = new MemoryFileManager(

        The following regression test fails on all platforms due to this bug:

        jdk/jshell/AnalysisTest.java

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iris Iris Clark
                  Reporter:
                  iris Iris Clark
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: