8206083: Make tools/javac/api/T6265137.java robust to JDK version changes
authordarcy
Thu, 28 Jun 2018 17:49:13 -0700
changeset 50897 a4d7eaf58623
parent 50896 1308189b0848
child 50898 12133a6e2613
8206083: Make tools/javac/api/T6265137.java robust to JDK version changes Reviewed-by: jjg
test/langtools/tools/javac/api/T6265137.java
--- a/test/langtools/tools/javac/api/T6265137.java	Thu Jun 28 17:45:59 2018 -0700
+++ b/test/langtools/tools/javac/api/T6265137.java	Thu Jun 28 17:49:13 2018 -0700
@@ -52,7 +52,9 @@
             String srcdir = System.getProperty("test.src");
             Iterable<? extends JavaFileObject> files =
                 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(srcdir, "T6265137a.java")));
-            javac.getTask(null, fm, dl, Arrays.asList("-target", "12"), null, files).call();
+            javac.getTask(null, fm, dl,
+                          Arrays.asList("-target", Integer.toString(Runtime.version().feature())),
+                          null, files).call();
         }
     }
 }