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 167336 - [67cat] Editor doens't show compile error for some Generics scenarios
Summary: [67cat] Editor doens't show compile error for some Generics scenarios
Status: RESOLVED DUPLICATE of bug 146272
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2009-06-18 21:10 UTC by Michel Graciano
Modified: 2009-06-20 14:25 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2009-06-18 21:10:28 UTC
[ BUILD # : 200906142201 ]
[ JDK VERSION : 1.6.* ]

For the following code snippet, the editor just shows up an warning
where it must shows an compile error.

Map<String, List<String>> status = new <String,
Comment 1 Jan Lahoda 2009-06-18 21:46:33 UTC
To my knowledge, this is a valid (although unusual) Java code, assuming that Map = java.util.Map and HashMap =
java.util.HashMap. See JLS which explicitely allows to use real type parameters for method invocations of
methods that take no type parameters. See issue #146272 desc4. Also note that the code can be compiled using a JDK1.7
javac (although JDK1.6 javac rejects it, which was most likely a bug fixed in JDK1.7). Also, when filling a
high-priority bug (P1/P2), please make sure the reason for the priority is obvious. Thanks.

*** This issue has been marked as a duplicate of 146272 ***
Comment 2 Michel Graciano 2009-06-18 22:24:00 UTC
Thanks for clarification.
About bug priority, for me it looks obviously, since editor should have the same behaviour that project JDK. IMHO, if
project uses some specific JDK version, editor should be consistent with it. Why I posted it as P1? It is simple, the
developers just waste some time to figure out why IDE shows up different behaviour that JDK compiler... so in this case
the tool just confuses the developer.

Comment 3 David Strupl 2009-06-20 14:25:13 UTC
As what is P1 please check these:

This one would qualify as P4?