Skip to content

Commit 60dbf5b

Browse files
committed
fix: handle cases where outer class is gone
1 parent b11314d commit 60dbf5b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

matcher-model/src/main/java/matcher/model/type/ClassInstance.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ public String getName(NameType type, boolean includeOuter) {
187187
return getNestedName(outerClass.getName(type), ret.substring(ret.lastIndexOf('/') + 1));
188188
} else { // ret is an outer name, restore pkg
189189
String matchedOuterName = matchedClass.outerClass.getName(type);
190+
191+
if (matchedOuterName == null) {
192+
return null;
193+
}
194+
190195
int pkgEnd = matchedOuterName.lastIndexOf('/');
191196
if (pkgEnd > 0) ret = matchedOuterName.substring(0, pkgEnd + 1).concat(ret);
192197

0 commit comments

Comments
 (0)