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 245859 - Specifying the same generic type twice results in compile error.
Summary: Specifying the same generic type twice results in compile error.
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 8.0
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
: 245888 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-21 22:10 UTC by CompufreakVultureX
Modified: 2014-07-23 08:19 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 CompufreakVultureX 2014-07-21 22:10:02 UTC
For example make a new project and in the main class put the following code:

@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-22 13:02:13 UTC
The problem is that your test case crashes the JDK8 javac compiler. Since the current NB editor uses JDK8 javac for its internal compilation, no information is provided about your source code (no error marks, etc.). Could you please file a bug against JDK8 javac and attach your source as a test case? Thanks.
Comment 2 CompufreakVultureX 2014-07-22 18:14:53 UTC
Alright. I don't know how I wound up to this category in the first place. They are rather confusing :s
I've posted a new bug here: https://netbeans.org/bugzilla/show_bug.cgi?id=245888
Hopefully that fits what you requested.
Comment 3 Dusan Balek 2014-07-23 08:19:04 UTC
*** Bug 245888 has been marked as a duplicate of this bug. ***