beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Ramirez (JIRA)" <...@beehive.apache.org>
Subject [jira] Closed: (BEEHIVE-831) NPE if a required annotation attribute is missing for @Jpf.ValidateRequired
Date Tue, 23 Aug 2005 22:17:09 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-831?page=all ]
     
Alejandro Ramirez closed BEEHIVE-831:
-------------------------------------


Verified fixed.  Executed the repro steps and now we no longer get the NullPointer Exception.
 Instead the user gets the following error message:

      [apt] Controller.java:20: Attribute "chars" must be present.
      [apt] public String getSearchText()
      [apt] ^
      [apt] 1 error


> NPE if a required annotation attribute is missing for @Jpf.ValidateRequired
> ---------------------------------------------------------------------------
>
>          Key: BEEHIVE-831
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-831
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: v1m1
>     Reporter: Rich Feit
>     Assignee: Alejandro Ramirez
>      Fix For: V1

>
> Repro:
>     - Add the following annotation to a form bean getter on an inner class of a page
flow:
>         @Jpf.ValidatableProperty(
>             validateMinLength=@Jpf.ValidateMinLength()
>         )
>     - Build the page flow.
> EXPECTED: an error that says the 'chars' attribute is required for @Jpf.ValidateMinLength
> ACTUAL: the following exception:
>     java.lang.NullPointerException
>         at org.apache.beehive.netui.compiler.genmodel.DefaultValidatorRuleFactory.getFieldRule(DefaultValidatorRuleFactory.java:85)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.getFieldRule(GenValidationModel.java:369)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.addFieldRuleFromAnnotation(GenValidationModel.java:352)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.addFieldRules(GenValidationModel.java:331)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.addRulesFromAnnotation(GenValidationModel.java:161)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.addRulesFromBeanClass(GenValidationModel.java:133)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.addRulesFromBeans(GenValidationModel.java:94)
>         at org.apache.beehive.netui.compiler.genmodel.GenValidationModel.<init>(GenValidationModel.java:72)
>         at org.apache.beehive.netui.compiler.FlowControllerGenerator.generate(FlowControllerGenerator.java:61)
>         at org.apache.beehive.netui.compiler.processor.BaseAnnotationProcessor.generate(BaseAnnotationProcessor.java:99)
>         at org.apache.beehive.netui.compiler.processor.TwoPhaseAnnotationProcessor.generate(TwoPhaseAnnotationProcessor.java:144)
>         at org.apache.beehive.netui.compiler.processor.TwoPhaseAnnotationProcessor.process(TwoPhaseAnnotationProcessor.java:89)
>         at org.apache.beehive.netui.compiler.processor.BaseAnnotationProcessor.process(BaseAnnotationProcessor.java:106)
>         at org.apache.beehive.netui.compiler.apt.BaseAnnotationProcessorFactory$DelegatingAnnotationProcessor.process(BaseAnnotationProcessorFactory.java:64)
>         at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
>         at com.sun.tools.apt.comp.Apt.main(Apt.java:404)
>         at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:440)
>         at com.sun.tools.apt.main.Main.compile(Main.java:1017)
>         at com.sun.tools.apt.main.Main.compile(Main.java:907)
>         at com.sun.tools.apt.Main.compile(Main.java:41)
>         at com.sun.tools.apt.Main.main(Main.java:32)
> This is happening because javac runs *after* annotation processing, so that missing annotation
members don't fail the build in time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message