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

JavaPlugin: Annotations and enums with no packages are created under the "null" package

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.2.0.Final
    • Fix Version/s: 1.2.1.Final
    • Component/s: Resources
    • Labels:
      None

      Description

      When no package is set, the org.jboss.forge.maven.facets.MavenJavaSourceFacet.getJavaResource(JavaSource<?>) method returns the class inside package "null".

      The following tests confirm that behavior:

         @Test
         public void testCreateAnnotationInRootFolder() throws Exception
         {
            queueInputLines("");
            getShell()
                     .execute(
                              "java new-annotation-type \"public @interface TestingAnnotationTypeCreation {}\"");
         }
       
         @Test
         public void testCreateEnumInRootFolder() throws Exception
         {
            queueInputLines("");
            getShell()
                     .execute(
                              "java new-enum-type \"public enum TestingEnumTypeCreation {}\"");
         }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gastaldi George Gastaldi
                Reporter:
                gastaldi George Gastaldi
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: