Bug 506243 - Infer Generic Type Arguments command should use diamond operator when possible
Summary: Infer Generic Type Arguments command should use diamond operator when possible
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted, usability
: 548193 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-19 19:55 EDT by Sergey Prigogin CLA
Modified: 2023-05-31 17:13 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.