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

NPE when compiling a page flow with @Jpf.MessageBundle that lacks 'bundlePath' attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V1Alpha, V1Beta
    • V1Beta
    • NetUI
    • None

    Description

      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.

      Attachments

        Activity

          People

            alramire Alejandro Ramirez
            rich Richard Feit
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: