Skip to content

fix null method parameter name in Asmifier causing npe

William Gray requested to merge wagyourtail/asm:null-param-name into master

Parameter Name is nullable in the docs, I noticed this as it is the case with synthetic methods compiled by javac on java 21 and higher

Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "string" is null
	at org.objectweb.asm.util.Printer.appendString(Printer.java:1234)
	at org.objectweb.asm.util.ASMifier.visitParameter(ASMifier.java:674)
	at org.objectweb.asm.util.TraceMethodVisitor.visitParameter(TraceMethodVisitor.java:71)
	at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1388)
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:745)
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
Edited by William Gray

Merge request reports

Loading