| Summary: | [1.7] [quick assist] Quick assists 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: | Deepak Azad <deepakazad> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | deepakazad, markus.kell.r, Michael_Rennie | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Deepak Azad
I will attach a patch. Created attachment 197665 [details]
fix + tests
Fixed in BETA_JAVA7 verified.
An example snippet to test with:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class MultiCatch {
public static void main(String[] args) {
File file = new File("");
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
System.err.println("reading...");
}
catch(IOException | NullPointerException ex){}
catch(IllegalArgumentException iae){}
file = new File("");
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
System.err.println("reading...");
}
catch(IOException ioe){}
catch(NullPointerException npe){}
catch(IllegalArgumentException iae){}
}
}
|