Bug 3367

Summary: JCK 1.4 - ICLS - An instance initializer in an anonymous class may throw any exception (1GK7LYF)
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description Olivier Thomann CLA 2001-10-10 22:53:56 EDT
http://www.ott.oti.com/uvm/OTIIBM/numbat/Testing/JCK-
14/tests/lang/ICLS/icls088/icls08891m22/icls08891m22.html - POSITIVE TEST
Test case:
	javac 1.4: OK
	javac 1.3:
icls08891m22.java:37: unreported exception java.lang.ClassNotFoundException; 
must be caught or declared to be thrown
        if (true) new Object() { { Class.forName(badName); } };
                                        ^
1 error
	Eclipse compiler:
----------
1. ERROR in icls08891m22.java (at line 37)
        if (true) new Object() { { Class.forName(badName); } };
                                   ^^^^^^^^^^^^^^^^^^^^^^
Exception java.lang.ClassNotFoundException thrown within an initializer must be 
handled locally
----------
NOTES:
Comment 1 Philipe Mulet CLA 2002-01-07 12:27:23 EST

*** This bug has been marked as a duplicate of 7184 ***