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

No check() phase during the Controller annotation processing for an external form bean class and ValidatableProperty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.0.2
    • NetUI
    • None

    Description

      The processing of ValidatableProperty annotations in an external form bean does not go through the typical check() phase of the TwoPhaseCoreAnnotationProcessor. During the Controller annotation processing during the check() we run through the FormBeanChecker and specifically the ValidateTypeGrammar.onCheck(), for an inner form bean. However, if we have an external form bean class, the Controller annotation processing only looks at the external form bean during the generate() phase. Any errors in the ValidatableProperty annotations of the external form bean will cause processing problems without providing the kind user messages during the check() phase.

      For example, if you have a ValidateType(type=String.class) you should see a message about using a primitive Class, e.g. int.class. However, you will get either an AssertionError or without asserts a ClassCastException in org.apache.beehive.netui.compiler.genmodel.DefaultValidatorRuleFactory.getFieldRule().

      I will attach a repro case.

      Attachments

        1. j1127-repro.zip
          4 kB
          Howard Carlin Rogers
        2. j1127-patch-newAPFactory.txt
          16 kB
          Howard Carlin Rogers

        Activity

          People

            jzhuo Julie Zhuo
            crogers Howard Carlin Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: