Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351464

Summary: [1.7][quick fix] Don't propose "Add multi-catch clause to surrounding try" if only one exception
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Deepak Azad <deepakazad>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: markus.kell.r, satyam.kandula
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
fix + tests none

Description Markus Keller CLA 2011-07-07 11:20:16 EDT
BETA_JAVA7

Don't propose "Add multi-catch clause to surrounding try" if only one exception is thrown:

	int m4() throws FileNotFoundException {
		if ("abc".length() == 3) {
			FileInputStream fis = new FileInputStream("/tmp/bla");
			try {
				return fis.available(); // QF here
			} finally {
				fis.close();
			}
		}
		return 1;
	}
Comment 1 Deepak Azad CLA 2011-07-09 00:38:46 EDT
Created attachment 199367 [details]
fix + tests

Fixed in BETA_JAVA7
Comment 2 Deepak Azad CLA 2011-07-09 00:38:57 EDT
.
Comment 3 Satyam Kandula CLA 2011-07-19 10:50:28 EDT
Verified using patch 1.0.0.v20110714-1400