8206083: Make tools/javac/api/T6265137.java robust to JDK version changes

Reviewed-by: jjg
This commit is contained in:
Joe Darcy 2018-06-28 17:49:13 -07:00
parent c89978f4fd
commit 69191fc4cc

View File

@ -52,7 +52,9 @@ public class T6265137 {
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();
}
}
}