mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java] inner class detection corrected; early exit added
This commit is contained in:
@@ -83,19 +83,19 @@ public class ClassFileViewProvider extends SingleRootFileViewProvider {
|
||||
@Override
|
||||
public void visitOuterClass(String owner, String name, String desc) {
|
||||
ref.set(Boolean.TRUE);
|
||||
throw new ProcessCanceledException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInnerClass(String name, String outer, String inner, int access) {
|
||||
if (inner == null || childName.equals(inner) && outer != null && parentName.equals(outer.substring(outer.lastIndexOf('/') + 1))) {
|
||||
if ((inner == null || childName.equals(inner)) && outer != null && parentName.equals(outer.substring(outer.lastIndexOf('/') + 1))) {
|
||||
ref.set(Boolean.TRUE);
|
||||
throw new ProcessCanceledException();
|
||||
}
|
||||
}
|
||||
}, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (ProcessCanceledException ignored) { }
|
||||
catch (Exception e) {
|
||||
Logger.getInstance(ClassFileViewProvider.class).warn(file.getPath(), e);
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,7 @@
|
||||
package pkg;
|
||||
|
||||
class KindaInner$Class { }
|
||||
class KindaInner$Class {
|
||||
void m() {
|
||||
new KindaInner$Class() { };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user