mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing
Reviewed-by: briangoetz
This commit is contained in:
parent
6d47fc6d5b
commit
ca747f09b6
40 changed files with 120 additions and 70 deletions
|
@ -63,8 +63,8 @@ public class InnerClassesHierarchyTest extends TestResult {
|
|||
for (File file : Arrays.asList(classDir.listFiles(filter))) {
|
||||
ClassModel classFile = readClassFile(file);
|
||||
String className = classFile.thisClass().name().stringValue();
|
||||
for (int i = 1; i < classFile.constantPool().entryCount(); ++i) {
|
||||
if (classFile.constantPool().entryByIndex(i) instanceof ClassEntry classInfo
|
||||
for (PoolEntry pe : classFile.constantPool()) {
|
||||
if (pe instanceof ClassEntry classInfo
|
||||
&& classInfo.asSymbol().isClassOrInterface()) {
|
||||
String cpClassName = classInfo.asInternalName();
|
||||
if (isInnerClass(cpClassName)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue