8267465: remove superfluous preview related annotations and test options

Reviewed-by: jlahoda
This commit is contained in:
Vicente Romero 2021-06-07 13:57:15 +00:00
parent 728a411a54
commit 4f9d6b7d68
33 changed files with 25 additions and 111 deletions

View file

@ -1497,8 +1497,7 @@ public class JavacParserTest extends TestCase {
void testStartAndEndPositionForClassesInPermitsClause() throws IOException {
String code = "package t; sealed class Test permits Sub1, Sub2 {} final class Sub1 extends Test {} final class Sub2 extends Test {}";
JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, fm, null,
List.of("--enable-preview", "-source", Integer.toString(Runtime.version().feature())),
null, Arrays.asList(new MyFileObject(code)));
null, null, Arrays.asList(new MyFileObject(code)));
CompilationUnitTree cut = ct.parse().iterator().next();
ClassTree clazz = (ClassTree) cut.getTypeDecls().get(0);
List<? extends Tree> permitsList = clazz.getPermitsClause();