On some of my classes I was getting this:
java.lang.NullPointerException
at org.objectweb.asm.MethodWriter.visitLocalVariable(Unknown Source)
at net.sourceforge.cobertura.instrument.SecondPassMethodInstrumenter.vis
itMaxs(SecondPassMethodInstrumenter.java:362)
at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)
at net.sourceforge.cobertura.instrument.FirstPassMethodInstrumenter.visi
tEnd(FirstPassMethodInstrumenter.java:96)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
An analysis showed that startLabel and endLabel were null in these cases. Staring at the code, it seems that these local variables aren't used/needed if startLabel & friends aren't initialized.
In this case, the attached patch should be harmless. In any case, it worked for me.
simple patch for "if not null" ... logic in visitMaxs
Logged In: YES
user_id=694119
Originator: NO
I was getting the same issue and this patch fixed the problem. +1 for adding this before next release.