This content has been marked as final.
Show 2 replies
-
1. Re: NullPointerException occurs when Handler#getType() metho
chiba May 16, 2005 12:21 PM (in response to daisuke)Thank you for your bug report and pretty good analysis.
It is really helpful.To avoid this problem, I propose to check null of the return value of
ConstPool#getClassInfo() (type of the exception) in the getType() method
Yes, this is a correct and quick fix. However, if your analysis is correct,
I think ExprEditor.edit(Handler) should not be called with a finally block.
(Note that Javac automatically adds a finally block for each synchronized
block. So the exception table includes a catch block or a finally
block.)
Don't you think I must modify the implementation of ExprEditor
rather than getType()? Or, do you like to hook both catch and finally
blocks?
Let me know your thought. Thx. -
2. Re: NullPointerException occurs when Handler#getType() metho
daisuke May 23, 2005 9:05 PM (in response to daisuke)I agree with you. Concretely, I propose the following modification.
- Change the ExprEditor#edit(Handler) method to hook only the catch block.
Moreover, I want to other methods to treat respectively the synchronized
block and finally block. So, I want you to adopt the new methods for hooking
the synchronized block and the finally block respectively.
I would prefer it if you could consider this idea.