8206083: Make tools/javac/api/T6265137.java robust to JDK version changes
Reviewed-by: jjg
--- 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();
}
}
}