NPE when compiling a page flow with @Jpf.MessageBundle that lacks 'bundlePath'
attribute
-----------------------------------------------------------------------------------------
Key: BEEHIVE-389
URL: http://issues.apache.org/jira/browse/BEEHIVE-389
Project: Beehive
Type: Bug
Components: NetUI
Versions: V1Beta
Reporter: Rich Feit
Assigned to: Rich Feit
Fix For: V1Beta
Repro: Compile a page flow that has the following annotation:
@Jpf.Controller(
messageBundles={
@Jpf.MessageBundle()
}
)
Expected: error about a missing required 'bundlePath' attribute.
Actual: the following NPE:
[apt] java.lang.NullPointerException
[apt] at
org.apache.beehive.netui.compiler.MergedControllerAnnotation.mergeAnnotationArray(MergedControllerAnnotation.java:121)
[apt] at
org.apache.beehive.netui.compiler.MergedControllerAnnotation.mergeAnnotation(MergedControllerAnnotation.java:89)
[apt] at
org.apache.beehive.netui.compiler.MergedControllerAnnotation.mergeControllerAnnotations(MergedControllerAnnotation.java:226)
[apt] at
org.apache.beehive.netui.compiler.MergedControllerAnnotation.<init>(MergedControllerAnnotation.java:54)
[apt] at
org.apache.beehive.netui.compiler.FlowControllerInfo.startBuild(FlowControllerInfo.java:130)
[apt] at
org.apache.beehive.netui.compiler.FlowControllerChecker.onCheck(FlowControllerChecker.java:85)
[apt] at
org.apache.beehive.netui.compiler.BaseChecker.check(BaseChecker.java:49)
[apt] at
org.apache.beehive.netui.compiler.BaseChecker.check(BaseChecker.java:70)
[apt] at
org.apache.beehive.netui.compiler.apt.BaseAnnotationProcessor.check(BaseAnnotationProcessor.java:65)
[apt] at
org.apache.beehive.controls.runtime.generator.apt.TwoPhaseAnnotationProcessor.check(TwoPhaseAnnotationProcessor.java:104)
[apt] at
org.apache.beehive.controls.runtime.generator.apt.TwoPhaseAnnotationProcessor.process(TwoPhaseAnnotationProcessor.java:86)
[apt] at
org.apache.beehive.netui.compiler.apt.BaseAnnotationProcessor.process(BaseAnnotationProcessor.java:104)
[apt] at
com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
[apt] at com.sun.tools.apt.comp.Apt.main(Apt.java:404)
[apt] at
com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:440)
[apt] at com.sun.tools.apt.main.Main.compile(Main.java:1017)
[apt] at com.sun.tools.apt.main.Main.compile(Main.java:907)
[apt] at com.sun.tools.apt.Main.compile(Main.java:41)
[apt] at com.sun.tools.apt.Main.main(Main.java:32)
This is actually a general problem with javac, which appears to fail to check
whether an annotation attribute (member) is required. We need to adapt in the
meantime, across the board. I'll make that part of this fix.
--
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira