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 229058 - Incorrect autocomplete with diamond notation in the case of interface implementation
Summary: Incorrect autocomplete with diamond notation in the case of interface impleme...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-26 09:30 UTC by piotr.praczyk
Modified: 2013-08-29 14:41 UTC (History)
1 user (show)

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 piotr.praczyk 2013-04-26 09:30:01 UTC
When I have the following variable:

HashMap<Resource, List<String>> results = new HashMap<>();

I try to add a new element... for example:

        results.put(null, new LinkedList<String>());

After I type LinkedList, the IDE suggests LinkedList<String>() ... however after selecting this option, it is replaced with LinkedList<>() ... which is immediately marked as an error (cannot be derived by the compiler).

Diamond notation should not be automatically inserted in the case of using a particular implementation of an interface (and possibly, inheritance)
Comment 1 Dusan Balek 2013-08-29 14:41:10 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/39807ea7dff4