Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Fix some NPEs #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/matcher/type/Analysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,9 @@ static void checkInitializer(FieldInstance field, ClassFeatureExtractor context)
while ((in = positionsToTrace.poll()) != null) {
int pos = il.indexOf(in);
Frame<SourceValue> frame = frames[pos];
if (frame == null) {
continue;
}
int stackConsumed = getStackDemand(in, frame);

for (int i = 0; i < stackConsumed; i++) {
Expand Down
3 changes: 3 additions & 0 deletions src/matcher/type/ClassEnvironment.java
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,9 @@ private static void detectOuterClass(ClassInstance cls, ClassNode cn) {
} else { // determine outer class by outer$inner name pattern
for (InnerClassNode icn : cn.innerClasses) {
if (icn.name.equals(cn.name)) {
if (icn.outerName == null) {
return;
}
addOuterClass(cls, icn.outerName, true);
return;
}
Expand Down