changeset 50897:a4d7eaf58623

8206083: Make tools/javac/api/T6265137.java robust to JDK version changes Reviewed-by: jjg
author darcy
date Thu, 28 Jun 2018 17:49:13 -0700
parents 1308189b0848
children 12133a6e2613
files test/langtools/tools/javac/api/T6265137.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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();
         }
     }
 }