Community
Participate
Working Groups
Using M5, I got severe NPE during code completion on the exception types inside a catch block formal parameter type. Steps to reproduce: 1) Use the attached source code 2) Go to the IO inside the catch block formal parameter definition. 3) After the IO, invoke code assist. 4) NPE I believe there are two places to fix. I'll provide a patch. Thanks Pascal for the test case.
Created attachment 58792 [details] Test case
Created attachment 58796 [details] Proposed fix David, please review. This is quite severe as it seems that any code completion on exception type is failing.
This seems to be a consequence of fix for bug 157584.
The problem occurs because of the inner try statement with no catch blocks but a finally block. If you add a catch block to the inner try statement, the exception is not thrown. So the null check added in the patch should be fine. This would be a good candidate for tomorrow's integration build :-).
Released for 3.3M6. The proposed fix is good. Thanks. I released your fix and added a regression test: CompletionTest#testCatchClauseExceptionRef15()
*** Bug 177073 has been marked as a duplicate of this bug. ***
Verified for 3.3 M6 using build I20070319-1335.