BytecodeParser icon indicating copy to clipboard operation
BytecodeParser copied to clipboard

exception on init method not called but enter called causing nullpointer

Open deanhiller opened this issue 11 years ago • 0 comments

I am not sure how to reproduce this and I worked around it by just doing if something != null but basically the bytecode stuff was wrapping enterMethod and exitMethod to be called around one of my methods(it seemed to always be the first method in my catch block) and initMethod was nevercalled.

Since initMethod was never called, I ended up with a nullpointer in enterMethod as it requires initMethod to be called.

The logic on whether to wire initMethod is strange in my opinion. The way it should be coded I would think is if(enterMethodAdded || exitMethodAdded) addInitMethod()

but instead it depends on different stuff.

deanhiller avatar Jan 05 '14 22:01 deanhiller