File tree Expand file tree Collapse file tree
test/langtools/tools/javac/records Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -960,6 +960,7 @@ public void testCheckInitializationOrderInCompactConstructor() throws Exception
960960 }
961961
962962 public void testAcceptRecordId () {
963+ String [] previousOptions = getCompileOptions ();
963964 String [] testOptions = {/* no options */ };
964965 setCompileOptions (testOptions );
965966 assertOKWithWarning ("compiler.warn.restricted.type.not.allowed.preview" ,
@@ -969,10 +970,11 @@ public void testAcceptRecordId() {
969970 " }\n " +
970971 " class record {}\n " +
971972 "}" );
972- setCompileOptions (PREVIEW_OPTIONS );
973+ setCompileOptions (previousOptions );
973974 }
974975
975976 public void testAnnos () throws Exception {
977+ String [] previousOptions = getCompileOptions ();
976978 String srcTemplate =
977979 """
978980 import java.lang.annotation.*;
@@ -1127,7 +1129,7 @@ record R(@Anno String s) {}
11271129 }
11281130
11291131 // let's reset the default compiler options for other tests
1130- setCompileOptions (PREVIEW_OPTIONS );
1132+ setCompileOptions (previousOptions );
11311133 }
11321134
11331135 private void checkTypeAnno (ClassFile classFile ,
You can’t perform that action at this time.
0 commit comments