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

Gracefully handle AnnotationInstance being null in InjectionPointsProcessor.syntheticBeans #3703

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • camel-quarkus-2.7-GA
    • camel-quarkus-2.2-GA
    • Camel Quarkus
    • None
    • False
    • None
    • False
    • % %
    • ?
    • -
    • 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: