| Summary: | [1.7][assist] CCE while invoking assist on a multi-catch block | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> | ||||
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | curtis.windatt.public | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 198879 [details]
proposed fix v1.0 + regression tests
Added instanceof checks in ThrownExceptionFinder
Released in BETA_JAVA7 branch Verified in I20110613-1736 using the patch from 20110714-1400 |
BETA_JAVA7 public class X { public void foo(boolean bool) throws Exception { try { if (bool) throw new Exception(); else throw new NullPointerException(); } catch (NullPointerException[] | RunExce<CTRL_SPACE>) { } } } Inovke content assist at the mentioned place above and you get java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.ArrayBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding at org.eclipse.jdt.internal.codeassist.ThrownExceptionFinder.removeCaughtExceptions(ThrownExceptionFinder.java:165)