Skip to content

Commit 63b9f2e

Browse files
olesya.subbotinanadeeshtv
authored andcommitted
Fix regex in KMP for visiting inner classes
Summary: The old regex was accepting all inner classes per each inner class instead of just the next inner class in the hierarchy, therefore the analysis was blowing up and visiting classes an unnesessarily huge amount of times.
1 parent c40f955 commit 63b9f2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kmp-library/src/main/java/com/guardsquare/proguard/kotlin/printer/KotlinMetadataPrinter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ private void visitChildClasses(Clazz clazz)
10801080
// Cache the synthetic class string, as we might have already visited them, so the string will be empty.
10811081
pushStringBuilder();
10821082
programClassPool.classesAccept(
1083-
clazz.getName() + TypeConstants.INNER_CLASS_SEPARATOR + "*",
1083+
clazz.getName() + TypeConstants.INNER_CLASS_SEPARATOR + "[^$]+",
10841084
new ReferencedKotlinMetadataVisitor(MyKotlinSourceMetadataPrinter.this));
10851085
String innerClassesString = popStringBuilder();
10861086
if (innerClassesString.length() > 0)

0 commit comments

Comments
 (0)