Bug 536156 - Bogus warnings when using duplicate imports
Summary: Bogus warnings when using duplicate imports
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.9   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-21 14:01 EDT by Andreas Sewe CLA
Modified: 2022-10-17 05:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sewe CLA 2018-06-21 14:01:52 EDT
I noticed this under the Eclipse IDE for Java Developers Photon RC4. The following piece of code produces the indicated, bogus warnings

  package test;

  import java.util.ArrayList;
  import java.util.List;
  import java.util.List; // The import java.util.List is never used


  public class Test {

    public static void main(String[] args) {
      List<Object> l = new ArrayList<>();
    }
  }

I would argue that the second, redundant import is used as well. More importantly, a warning along the lines of "duplicate import" would have been more useful.
Comment 1 Eclipse Genie CLA 2020-08-05 14:20:30 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 2 Eclipse Genie CLA 2022-10-17 05:25:47 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.