< prev index next > test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java
Print this page
/*
- * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
public InnerClassesInLocalClassTest() {
innerClassesData = new ArrayList<>();
for (Modifier outerModifier : LOCAL_CLASS_MODIFIERS) {
StringBuilder sb = new StringBuilder();
sb.append(outerModifier.getString()).append(' ');
- sb.append("class Local {");
+ sb.append("class Local { int f; "); // impose identity to make testing predictable.
Map<String, Set<String>> class2Flags = new HashMap<>();
for (int i = 0; i < LOCAL_CLASS_MODIFIERS.length; ++i) {
Modifier innerModifier = LOCAL_CLASS_MODIFIERS[i];
sb.append(innerModifier.getString()).append(' ')
.append("class").append(' ')
< prev index next >