fix assertion error if the param.sym is null

This commit is contained in:
Roel Spilker committed 2020-07-09 22:53:44 +02:00
1 parent 2e08e49ed7
commit baa3848498
1 file changed
+2 -1
@@ -1205,9 +1205,10 @@ public class JavacHandlerUtil {
if (method.getParameters() != null && !method.getParameters().isEmpty()) {
ListBuffer<Symbol.VarSymbol> newParams = new ListBuffer<Symbol.VarSymbol>();
for (JCTree.JCVariableDecl param : method.getParameters()) {
newParams.append(param.sym);
if (param.sym != null) newParams.append(param.sym);
}
params = newParams.toList();
if (params.length() != method.getParameters().length()) params = null;
}
fixMethodMirror(typeNode.getContext(), typeNode.getElement(), method.getModifiers().flags, method.getName(), paramTypes, params, returnType);