Uploaded image for project: 'Red Hat Build of Apache Camel for Quarkus'
  1. Red Hat Build of Apache Camel for Quarkus
  2. CEQ-930

Gracefully handle AnnotationInstance being null in InjectionPointsProcessor.syntheticBeans #3703

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 0

      Some potential edge cases can result in an NPE that we should try to avoid. And at a minimum throw a friendlier exception that could perhaps hint at what the problem is.

      E.g something like this results in an NPE during the build phase:

      @Produce
      @Inject
      FluentProducerTemplate template;
      

      Log shows:

      [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.2.5.Final-redhat-00010:build (default) on project smr-onelink-manual-feed: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
      [ERROR]     [error]: Build step org.apache.camel.quarkus.core.deployment.InjectionPointsProcessor#syntheticBeans threw an exception: java.lang.NullPointerException
      

            zfeng@redhat.com Zheng Feng
            rhn-support-aboucham Abel Bouchama
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: