| Summary: | [1.7] [clean up] to convert multiple catch blocks to a single multi-catch block and vice versa | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Deepak Azad <deepakazad> |
| Component: | UI | Assignee: | Fabrice Tiercelin <fabrice.tiercelin> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | carsten.hammer, daniel_megert, deepakazad, fabian.pfaff, fabrice.tiercelin, Lars.Vogel, markus.kell.r, pbenedict |
| Version: | 3.7 | Keywords: | usability |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Deepak Azad
Before you implement this, I think bug 366453 and this should be fixed. Place your cursor on the second catch block and combine them via quick assist. Before: try { new FileWriter(""); } catch (FileNotFoundException e) { } catch (IOException e) { } Result: try { new FileWriter(""); } catch (FileNotFoundException | IOException e) { } This is a compiler error; it is not valid for catch blocks to have a union of types that are in a subtype/supertype relationship. Adding Carsen, who did such cleanups (manual or maybe via Netbeans) in the past for the Eclipse code base. *** This bug has been marked as a duplicate of bug 569879 *** |