Bug 7184 - Built in compiler does not allow anonymous class initializers to throw exceptions
Summary: Built in compiler does not allow anonymous class initializers to throw except...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 3367 3386 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-12-28 14:07 EST by John Wilson CLA
Modified: 2002-01-11 08:35 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilson CLA 2001-12-28 14:07:53 EST
The built in Java compiler generates a error message of the form "Exception 
xxxx thrown within an initializer must be handled locally" when the initializer 
of an anonymous class can throw an uncaught checked exception. This is contrary 
to section 8.6 of the JLS version 2 (top of page 189) "An instance initializer 
in an anonymous class ca throw any exception".
Comment 1 Philipe Mulet CLA 2002-01-07 11:57:02 EST
Changed exception analysis to allow this scenario (for anonymous constructors, 
the list can be augmented by uncaught checked exceptions).
Fixed.
Comment 2 Philipe Mulet CLA 2002-01-07 12:27:23 EST
*** Bug 3367 has been marked as a duplicate of this bug. ***
Comment 3 Philipe Mulet CLA 2002-01-07 12:30:36 EST
*** Bug 3386 has been marked as a duplicate of this bug. ***