Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18871

Gracefully handle AnnotationInstance being null in InjectionPointsProcessor.syntheticBeans #3703

XMLWordPrintable

    • False
    • None
    • False
    • 0
    • 0% 0%
    • -
    • No test

      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
              Martin Muzikar Martin Muzikar
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: