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 226919 - NetBeans offer to use diamong where it is not feasible
Summary: NetBeans offer to use diamong where it is not feasible
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-02 00:17 UTC by ecerichter
Modified: 2013-03-29 14:53 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 ecerichter 2013-03-02 00:17:08 UTC
Product Version = NetBeans IDE Dev (Build 201302272300)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_13
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

NetBeans offer to use diamong where it is not feasible. For instance, in the following code, the diamon construct is a violation of Java 7 syntax:

Correct code (compile fine under JDK 7):
    b.setFichaCompensacaoMsgs(new ArrayList<BoletoMensagemFC>());

Invalid code proposed by NetBeans (causes error compiling under JDK 7):
    b.setFichaCompensacaoMsgs(new ArrayList<>());


This error would lead novices to get nuts trying to compile the code

Regards,

Edson
Comment 1 Jan Lahoda 2013-03-04 18:02:30 UTC
I am working on this.
Comment 2 Jan Lahoda 2013-03-07 10:01:06 UTC
Will be fixed once we will get this fix into NB:
http://hg.openjdk.java.net/jdk8/tl/langtools/rev/8a78243291ef
Comment 3 Jan Lahoda 2013-03-29 14:53:02 UTC
Its brought in by this change, AFAIK:
http://hg.netbeans.org/jet-main/rev/8add50d93070
http://hg.netbeans.org/main/nb-javac/rev/8a78243291ef