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

No such child when doing a --targetClass

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.16.0.Final
    • 2.15.2.Final
    • UI - API
    • None

      The JavaAddAnnotationCommandImpl command adds an annotation to an existing class :

      @FacetConstraint(JavaSourceFacet.class)
      public class JavaAddAnnotationCommandImpl extends AbstractProjectCommand implements JavaAddAnnotationCommand
      {
         @Inject
         @WithAttributes(label = "Target Class", description = "The class where the annotation will be added", required = true, type = InputType.DROPDOWN)
         private UISelectOne<JavaResource> targetClass;
      

      But when the parameter targetClass is used, there is a no such child

      [bin]$ project-new --named test
      ***SUCCESS*** Project named 'test' has been created.
      
      [test]$ java-new-class --named MyClass
      ***SUCCESS*** Class org.test.MyClass was created
      
      [MyClass.java]$ java-add-annotation --annotation java.lang.annotation.Documented --targetClass org.test.MyClass 
      Exception when parsing/running: java-add-annotation --annotation java.lang.annotation.Documented --targetClass org.test.MyClass , no such child: org.test.MyClass
      ***INFO*** (type "export VERBOSE=true" to enable stack traces)
      

              rhn-support-ggastald George Gastaldi
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: