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 250587 - Hint to add missing diamond operator
Summary: Hint to add missing diamond operator
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P1 normal with 2 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-20 17:49 UTC by cezariusz
Modified: 2015-10-02 12:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2015-02-20 17:49:17 UTC
Consider this code:

        List<String> list = new ArrayList();

There is a warning "[unchecked] unchecked conversion", which is fine. But when I invoke the quick hint list, there's only "Suppress Warning - unchecked" hint. There should be also a hint do add diamond operator, like this:

        List<String> list = new ArrayList<>();
Comment 1 Svata Dedic 2015-03-26 13:32:32 UTC
Enhancement. P1 as we already also a hint which suggests to use diamod op instead of explicit type param.