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.

Bug 8757 - fastjavac.exe fails to correctly compile try catch block.
Summary: fastjavac.exe fails to correctly compile try catch block.
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: Other Windows 3.1/NT
: P3 major (vote)
Assignee: Ivan Bradac
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-12-04 16:05 UTC by Wally Highsmith
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wally Highsmith 2000-12-04 16:05:58 UTC
/*
 * 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();
    }

}
Comment 1 Svata Dedic 2000-12-04 16:13:59 UTC
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).
Comment 2 Wally Highsmith 2000-12-04 16:25:59 UTC
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
Comment 3 Svata Dedic 2000-12-04 16:35:59 UTC
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.
Comment 4 Svata Dedic 2000-12-04 16:44:59 UTC
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.
Comment 5 Wally Highsmith 2000-12-04 16:49:59 UTC
Bug was found in source generated by BEA's weblogic stub generator for their
application server.
Comment 6 Svata Dedic 2001-01-17 16:00:59 UTC
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.
Comment 7 Svata Dedic 2001-02-14 13:57:59 UTC
Reopening/reassigning to Sustaining team.
Comment 8 Ivan Bradac 2001-02-16 12:37:47 UTC
Has been forwarded to the Sun's fastjavac team.
Check the current status on:
http://developer.java.sun.com/developer/bugParade/bugs/4394676.html
Comment 9 Quality Engineering 2003-07-01 13:11:56 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 10 Quality Engineering 2003-07-01 13:15:57 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 11 Jan Chalupa 2003-10-30 12:07:30 UTC
A mistakenly closed RESOLVED LATER/REMIND issue. Reopening.
Comment 12 Jan Pokorsky 2003-12-05 10:57:03 UTC
Fastjavac is not supported anymore and since it is a close source there is no
reason to keep this as open issue.
Comment 13 Quality Engineering 2007-09-20 11:49:33 UTC
Reorganization of java component