< prev index next > test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java
Print this page
}
@Override
public List<TestCase> generateTestCases() {
currentClassType = ClassType.CLASS;
- setPrefix("class Anonymous {} {new Anonymous() {");
+ setPrefix("class Anonymous { int f; } {new Anonymous() {"); // impose identity to make testing predictable.
List<TestCase> sources = super.generateTestCases();
currentClassType = ClassType.INTERFACE;
setPrefix("interface Anonymous {} {new Anonymous() {");
sources.addAll(super.generateTestCases());
@Override
public void getAdditionalFlags(Map<String, Set<String>> class2Flags, ClassType type, Modifier... flags) {
super.getAdditionalFlags(class2Flags, type, flags);
class2Flags.put("Anonymous", getFlags(currentClassType, Arrays.asList(flags)));
- class2Flags.put("1", new HashSet<>() {});
+ class2Flags.put("1", new HashSet<>(Arrays.asList("ACC_IDENTITY")));
}
}
< prev index next >