Community
Participate
Working Groups
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:
*** This bug has been marked as a duplicate of 7184 ***