Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-3314

Organize Import Removes Imports That Are Needed When An Alias Is Used

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.3.0.M1
    • EDITING, GRAILS
    • None
    • os x

    Description

      If I import 2 classes that have the same name and alias one of them with "as", GGTS seems to remove all but the first one. When I Organize Imports for the following code, GGTS removes the second import statement.

      TypeHelper
      package org.demo
      
      import com.sun.tools.javac.code.Type
      import java.lang.reflect.Type as ReflectionType
      
      class TypeHelper {
          Type someType
          ReflectionType reflectionType
      }
      

      I have not tested other versions so I am not sure if this is relevant but I am using the latest build snapshots. If you have trouble reproducing and need any specific build information from me, please let me know.

      Attachments

        Activity

          People

            aeisenberg Andrew Eisenberg
            jbrown Jeff Brown
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: