Bug 89454 - [1.5][compiler] Unexpected uncaught exception error with generic exception type.
Summary: [1.5][compiler] Unexpected uncaught exception error with generic exception type.
Status: RESOLVED DUPLICATE of bug 83002
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-29 22:59 EST by Jesse Hull CLA
Modified: 2005-03-30 08:12 EST (History)
0 users

See Also:


Attachments
Thrower.java (97 bytes, text/plain)
2005-03-29 23:05 EST, Jesse Hull CLA
no flags Details
GenericsTest.java (379 bytes, text/plain)
2005-03-29 23:06 EST, Jesse Hull CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Hull CLA 2005-03-29 22:59:50 EST
I am using eclipse 3.1M5a with java 1.5 (detailed versions below)

Steps to reproduce:

1) Create the following two files (they must be seperate files if they are in
the same file this error does not occur)

In GenericsTest.java

class MyException extends Exception {
}

public class GenericsTest {
    public static void main(String[] args) throws MyException {
        Thrower<MyException> thrower = new Thrower<MyException>() {
            public void throwIt() throws MyException {
                throw new MyException();
            }
        };
        thrower.throwIt();
    }
}


In Thrower.java

public interface Thrower<E extends Exception> {
    public void throwIt() throws E;
}


2) When a clean build is done they compile fine. 
3) As soon as you edit GenericsTest.java the following compiler error appears:

Unhandled exception of type Exception on line 15 of GenericsTest.java



These two files compile correctly with javac 1.5

Windows Version: Windows XP SP2
Java version: build 1.5.0_01-b08
Eclipse Version: 3.1.0
Eclipse Build id: I20050219-1500
Comment 1 Jesse Hull CLA 2005-03-29 23:05:38 EST
Created attachment 19305 [details]
Thrower.java
Comment 2 Jesse Hull CLA 2005-03-29 23:06:34 EST
Created attachment 19306 [details]
GenericsTest.java
Comment 3 Philipe Mulet CLA 2005-03-30 08:12:08 EST
Added GenericTypeTest#test567

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