Community
Participate
Working Groups
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".
Changed exception analysis to allow this scenario (for anonymous constructors, the list can be augmented by uncaught checked exceptions). Fixed.
*** Bug 3367 has been marked as a duplicate of this bug. ***
*** Bug 3386 has been marked as a duplicate of this bug. ***