Skip to content

Commit

Permalink
Fix anonymous classes being included in class stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jan 11, 2025
1 parent af7d9da commit 7da81ca
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ else if (method.hasPrivateModifier())

NameType paramInfo = getInfo("p" + i, paramType.descriptor());
code.append(paramInfo.className).append(' ').append(paramInfo.name);
if (i < parameterCount - 1) code.append(", ");
if (i < parameterCount - 1)
code.append(", ");
}
code.append(") { ");
if (isCtor) {
Expand Down Expand Up @@ -339,6 +340,8 @@ protected void appendInnerClasses(@Nonnull StringBuilder code) throws Expression
continue;
if (innerClassName.length() <= className.length())
continue;
if (!isSafeClassName(innerClassName.replace('/', '.').replace('$', '.')))
continue;
ClassPathNode innerClassPath = workspace.findClass(innerClassName);
if (innerClassPath != null) {
ClassInfo innerClassInfo = innerClassPath.getValue();
Expand Down

0 comments on commit 7da81ca

Please sign in to comment.