Bug 3367 - JCK 1.4 - ICLS - An instance initializer in an anonymous class may throw any exception (1GK7LYF)
Summary: JCK 1.4 - ICLS - An instance initializer in an anonymous class may throw any ...
Status: RESOLVED DUPLICATE of bug 7184
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:53 EDT by Olivier Thomann CLA
Modified: 2002-01-11 08:37 EST (History)
0 users

See Also:


Attachments

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