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

Summary: Hint to add missing diamond operator
Product: java Reporter: cezariusz <cezariusz>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P1    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

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.