This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
/* * TestClass.java * * Created on December 4, 2000, 10:44 AM */ package JavaTests; /** * * @author whighsmith * @version */ public class TestClass extends Object { /** Creates new TestClass */ public TestClass() { } private static void testNestTryCatch() { try { System.out.println("This is a test"); try { Integer.parseInt("3"); } catch (java.lang.Exception nfe) { throw new java.lang.ExceptionInInitializerError(nfe); } } catch (java.lang.Exception e) { System.out.println(e.getMessage()); } } /** * @param args the command line arguments */ public static void main (String args[]) { TestClass.testNestTryCatch(); } }
What result did you expect to get and what the fastjavac actually did ? Please, verify if the error really happened in NetBeans 3.0 (or Forte4j 1.0*) or it is present in contemporary versions (f4j 2.0 beta, NetBeans 3.1 beta) and include build number of the IDE and/or version of fastjavac itself (fastjavac -version).
Expected to get successful compile; however I got JavaTests/TestClass.java [31:1] Exception java.lang.Exception is never thrown in the body of the corresponding try statement. catch (java.lang.Exception e) { ^ 1 error This compile error does not occur with javac.exe. This error occurred in Forte 1.0 build 842 with updates included for release 2. fastjavac: version 4.0, 07/17/00-12:29, build #337 Forte CE 1.0 build 842
Actually the compiler is ALMOST right, Exception subclasses are not thrown from the outer try {} catch block (ExceptionInInitializerError is subclass of an Error not an Exception) -- except some that some RuntimeException subclass (a subclass of Exception) *may* be thrown from System.out.println() implementation. Those exception is NOT declared and fastjavac seems to ignore their (implicit) presence.
The behaviour is present in also in [NetBeans dev-build-20], fastjavac version = version 4.0, "10/20/00-14:21", build #441. I am bumping the priority since less experienced users may be convinced that Exception is not actually thrown from the guarded code block. The bug prevents valid code from compiling.
Bug was found in source generated by BEA's weblogic stub generator for their application server.
As other team does fastjavac development, there's nothing we can do for fixing the bug than hand over the bug descriptions to the responsible team (already done). We will send out a message to nbusers@ and nbdev@ if/when new release of fastjavac will be available.
Reopening/reassigning to Sustaining team.
Has been forwarded to the Sun's fastjavac team. Check the current status on: http://developer.java.sun.com/developer/bugParade/bugs/4394676.html
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.
A mistakenly closed RESOLVED LATER/REMIND issue. Reopening.
Fastjavac is not supported anymore and since it is a close source there is no reason to keep this as open issue.
Reorganization of java component