Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-381

NPE thrown from AbstractInjectable if dependent producer returns null

    XMLWordPrintableJSON

    Details

      Description

      According to the spec, Dependent scoped producer beans can return null values, however this leads to a NPE in OWB while checking if the return is serializable.

      Stack below:

      Caused by: java.lang.NullPointerException
      at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:132)
      at org.apache.webbeans.inject.InjectableMethods.doInjection(InjectableMethods.java:112)
      at org.apache.webbeans.component.ProducerMethodBean.createDefaultInstance(ProducerMethodBean.java:182)

      Should be a simple fix of checking for null before calling injected.getClass.

        Attachments

          Activity

            People

            • Assignee:
              bergmark Joseph E Bergmark
              Reporter:
              bergmark Joseph E Bergmark
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: