Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-511

Apt hangs when processing sources with errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • v1m1
    • v1m1
    • Build
    • None

    Description

      Apt'hangs' under the following circumstance.

      When processing a @Control field, if it is a control-bean reference, e.g.
      @Control SomeBean _bean;
      field where SomeBean is generated from a Some.jcx file, but at the time the _bean field is being processed the SomeBean class has not been generated or more specifically in the javac class table, then the loop in the ControlClientAnnotationProcessor:
      ------------------------------------------

      ClassType classType = (ClassType)fieldType;

      outer: while ( classType != null )
      {
      Collection<InterfaceType> intfs =classType.getSuperinterfaces();
      for ( InterfaceType intfType : intfs )
      {
      if ( intfType.getDeclaration().getQualifiedName().equals( "org.apache.beehive.controls.api.bean.ControlBean" ) )

      { foundControlBean = true; break outer; }
      }
      classType = classType.getSuperclass();
      }

      --------------------------------------------
      Will never end because the original fieldType (SomeBean) is an error-type that returns an error-type when getSuperClass() is called.

      The following suffices to break the loop:
      --------------------------------------------
      ClassType classType = (ClassType)fieldType;

      outer: while ( classType != null )
      {
      Collection<InterfaceType> intfs = classType.getSuperinterfaces();
      for ( InterfaceType intfType : intfs )
      {
      if ( intfType.getDeclaration().getQualifiedName().equals( "org.apache.beehive.controls.api.bean.ControlBean" ) )
      { foundControlBean = true; break outer; }

      }
      ClassType superType = classType.getSuperclass();
      if(superType != null && superType.equals(classType))

      { break; }

      classType = superType;
      }

      Attachments

        Activity

          People

            jzhuo Julie Zhuo
            cbrettbennett C Brett Bennett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: