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 56579 - Enum as Generic Type throws misleading warning
Summary: Enum as Generic Type throws misleading warning
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-17 02:27 UTC by fuege
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 fuege 2005-03-17 02:27:12 UTC
As of Java 1.5.0_01 a certain bug in the generics support of java was fixed 
(see Java Bug-ID: 4856983) concerning e. g. an Enum as a generic type including 
an additional Interface as its erasure.

A class signature like the following is now supported:

public class MyClass<E extends Enum<E> & MyInterface>

NetBeans editor gives a (wrong|misleading) warning for that class signature 
line (red underlined, tooltip saying: "class cannot directly extend 
java.lang.Enum").

Probably, parsing of the keyword "extend" leads to that (wrong) result.
Comment 1 Martin Matula 2005-03-17 09:13:02 UTC
This works for me in the current trunk build.
It might have not worked in older builds on NetBeans (e.g. 4.0) since we are
internally using javac for errors underlining and we were co-bundling a version
that was most recent at that time and the bug was not fixed in it yet.
Comment 2 Quality Engineering 2007-09-20 11:58:03 UTC
Reorganization of java component