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

Java Parser incorrectly resolves some dependent classes to java.lang.xxx when resolving imports for an Entity

XMLWordPrintable

    • Workaround Exists
    • Hide

      Do not use Entity class names that finish with a java.lang classname.

      Show
      Do not use Entity class names that finish with a java.lang classname.
    • Low

      When generating imports in a Backing Bean for a dependent class, the java parser looks for imports in the Entity bean. When the dependent class is in the local package there may be no explicit import, so org.jboss.forge.parser.java.util.Types.isJavaLang looks for matches between the classname and the set of java.lang classes.

      This is fine, but it currently looks for anything ending with a java.lang classname and decides they are a java.lang class, so for example AssetClass would be deemed a java.lang class and incorrectly imported as java.lang.AssetClass.

      The decision should be made on an exact match to a java.lang class, it doesn't sense that anything that is not an exact match should be deemed a java.lang class.

              greg.steel Greg Steel (Inactive)
              greg.steel Greg Steel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: