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 245888 - Specifying the same generic type twice results in compile error.
Summary: Specifying the same generic type twice results in compile error.
Status: RESOLVED DUPLICATE of bug 245859
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.0
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-22 18:13 UTC by CompufreakVultureX
Modified: 2014-07-23 08:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Compilable source folder (668 bytes, application/x-zip-compressed)
2014-07-22 18:13 UTC, CompufreakVultureX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CompufreakVultureX 2014-07-22 18:13:15 UTC
Created attachment 148214 [details]
Compilable source folder

For example make a new project and in the main class put the following code (I've also added this code as an attachment):

@FunctionalInterface
public interface Action2E<A, A, E extends Throwable> {
        void invoke(A arg1, A arg2) throws E;
}

Generic type A is specified twice. There is no compile error. When you try to run the project you get an error that the Main class is not found.

In my own project this function was in another class in another package. Somehow I managed to fix the Main class not found error by replacing the Main function, but it introduced a NoClassDefFoundError somewhere else. As soon as I found out that my code caused the error I deleted it, but the project is beyond repair. Auto-complete is broken, and it won't run anymore. Clean and Build results in an error that tells me I should file a bug.

I had to create an entirely new project without the erroneous code and now everything works fine again.
Comment 1 Dusan Balek 2014-07-23 08:19:04 UTC

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