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

controls annotation processor needs to safely handle a missing -classpath option

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.1
    • Controls
    • None

    Description

      When the controls annotation processing class AptControlInterface attempts to resolve types during checking, it expects to find a value for the "-classpath" environment variable. If this value is missing, the AptControlInterface class NPEs at the stack trace below because null is returned for the URLClassLoader.

      This should either throw an exception to stop annotation processing or log a warning and continue annotation processing. Kyle / Ken, any thoughts there?

      Stack trace:
      java.lang.NullPointerException
      [java] at org.apache.beehive.controls.runtime.generator.AptControlInterface.check(AptControlInterface.java:949)
      [java] at org.apache.beehive.controls.runtime.generator.AptControlInterface.<init>(AptControlInterface.java:121)
      [java] at org.apache.beehive.controls.runtime.generator.apt.ControlAnnotationProcessor.check(ControlAnnotationProcessor.java:56)
      [java] at org.apache.beehive.controls.runtime.generator.apt.TwoPhaseAnnotationProcessor.check(TwoPhaseAnnotationProcessor.java:104)
      [java] at org.apache.beehive.controls.runtime.generator.apt.TwoPhaseAnnotationProcessor.process(TwoPhaseAnnotationProcessor.java:86)

      Attachments

        1. BEEHIVE-889.diff
          2 kB
          Chad Schoettger

        Activity

          People

            ekoneil Edward O'Neil
            ekoneil Edward O'Neil
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: