Bug 506243

Summary: Infer Generic Type Arguments command should use diamond operator when possible
Product: [Eclipse Project] JDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: jjohnstn, Lars.Vogel, noopur_gupta
Version: 4.6Keywords: helpwanted, usability
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=472503
Whiteboard: stalebug

Description Sergey Prigogin CLA 2016-10-19 19:55:36 EDT
Infer Generic Type Arguments on the following code

    List list = new ArrayList();
    list.add("");

should produce

    List<String> list = new ArrayList<>();
    list.add("");

instead of

    List<String> list = new ArrayList<String>();
    list.add("");

when source compatibility allows that.
Comment 1 Dani Megert CLA 2019-06-12 12:15:53 EDT
*** Bug 548193 has been marked as a duplicate of this bug. ***
Comment 2 Eclipse Genie CLA 2021-06-02 10:53:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Jeff Johnston CLA 2021-06-02 13:19:50 EDT
Still occurs in 4.20 RC1
Comment 4 Eclipse Genie CLA 2023-05-31 17:13:54 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.