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

Bug 348369

Summary: [1.7] Missing error "No exception of type Exception[] can be thrown"
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, satyam.kandula, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch v0.99
none
Proposed patch + tests none

Description Deepak Azad CLA 2011-06-06 05:19:14 EDT
BETA_JAVA7

The compiler does not show any error in the following snippet.
---------------------------------
try {
	System.out.println();
} catch (Exception e []) { 
	e.printStackTrace();
} 
---------------------------------

but shows an error for the following
---------------------------------
try {
	System.out.println();
} catch (Exception [] e) { 
	e.printStackTrace();
} 
---------------------------------

Both snippets result in an error with HEAD
Comment 1 Srikanth Sankaran CLA 2011-06-06 05:28:48 EDT
I'll take a look,
Comment 2 Srikanth Sankaran CLA 2011-06-06 07:06:06 EDT
Created attachment 197385 [details]
Patch v0.99

This fixes the problem and includes tests.

There is still some issue with source positions.
Comment 3 Srikanth Sankaran CLA 2011-06-06 10:37:10 EDT
Created attachment 197397 [details]
Proposed patch + tests
Comment 4 Srikanth Sankaran CLA 2011-06-06 13:20:36 EDT
Thanks for the report, fix & tests released in BETA_JAVA 7 branch.
Comment 5 Satyam Kandula CLA 2011-07-01 01:08:58 EDT
Verified using Eclipse Java 7 Support(Beta) feature patch v20110623-0900.