Skip to content

Commit

Permalink
Fixes bug on the icons of types on the tree
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed Jun 20, 2015
1 parent 112e175 commit a4488ab
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Type make(API api, Container.Entry entry, String fragment) {
}
}

return new JavaType(entry, classReader);
return new JavaType(entry, classReader, -1);
} catch (IOException ignore) {
return null;
}
Expand All @@ -131,13 +131,13 @@ static class JavaType implements Type {
protected List<Type.Method> methods = null;

@SuppressWarnings("unchecked")
protected JavaType(Container.Entry entry, ClassReader classReader) {
protected JavaType(Container.Entry entry, ClassReader classReader, int outerAccess) {
this.classNode = new ClassNode();
this.entry = entry;

classReader.accept(classNode, ClassReader.SKIP_CODE|ClassReader.SKIP_DEBUG|ClassReader.SKIP_FRAMES);

this.access = classNode.access;
this.access = (outerAccess == -1) ? classNode.access : outerAccess;
this.name = classNode.name;

this.superName = ((access & Opcodes.ACC_INTERFACE) != 0) && "java/lang/Object".equals(classNode.superName) ? null : classNode.superName;
Expand Down Expand Up @@ -227,7 +227,7 @@ public List<Type> getInnerTypes() {
if (innerEntry != null) {
try (InputStream is = innerEntry.getInputStream()) {
ClassReader classReader = new ClassReader(is);
innerTypes.add(new JavaType(innerEntry, classReader));
innerTypes.add(new JavaType(innerEntry, classReader, innerClassNode.access));
} catch (IOException ignore) {
}
}
Expand Down

0 comments on commit a4488ab

Please sign in to comment.