Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-27

Wrong import if imported class is a nested class

XMLWordPrintable

      For example, if we have the following classes:

      public class A {
      
        public static class B {
        }
      }
      

      The import com.example.foo.A$B is added for the class B instead of com.example.foo.A.B. It's because AbstractJavaSource#addImport(Class<?> type) uses type.getName() to create the import, which returns com.example.foo.A$B.

            lincolnthree Lincoln Baxter III (Inactive)
            kevinpollet Kévin Pollet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: