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

Summary: Specifying the same generic type twice results in compile error.
Product: platform Reporter: CompufreakVultureX
Component: JDK ProblemsAssignee: Antonin Nebuzelsky <anebuzelsky>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:

Description CompufreakVultureX 2014-07-21 22:10:02 UTC
For example make a new project and in the main class put the following code:

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:
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. ***