Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351464 - [1.7][quick fix] Don't propose "Add multi-catch clause to surrounding try" if only one exception
Summary: [1.7][quick fix] Don't propose "Add multi-catch clause to surrounding try" if...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 11:20 EDT by Markus Keller CLA
Modified: 2011-08-02 05:45 EDT (History)
2 users (show)

See Also:


Attachments
fix + tests (6.44 KB, patch)
2011-07-09 00:38 EDT, Deepak Azad CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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