Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-421

Rule "Useless imports should be removed" generates some false-positives when current package and imported packages are very close

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: Rules
    • Labels:
      None

      Description

      Here is the piece of code to reproduce the issue :

      package com.google.foo;
      
      import com.google.foobar.*; //<- Unexpected issue here
      import java.util.*;
      
      public class MyClass {...}
      

        Attachments

          Activity

            People

            Assignee:
            benzonico OLD - Nicolas Peru
            Reporter:
            freddy.mallet Freddy Mallet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: