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

Producer Fields don't work with Interceptors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.2
    • 1.6.3
    • Core
    • None

    Description

      For this bug to be triggered, it takes an intercepted class with a producer field in it. See attached maven project as a very small code base for this. It runs directly as JavaSE (Main#main) for your convenience.

      org.apache.webbeans.portable.ProducerFieldProducer will eventually access the field inside the generated OwbInterceptProxy instead of the actual bean. This means that "null" values are produced, not the actual values generated in the intercepted class.

      Affected line as of 1.6.2 is 84: instance = (T) field.get(parentInstance)

      parentInstance is a proxy object, not the actual bean. Therefore instance will be null.

      Attachments

        1. producer-field.tar.gz
          2 kB
          Tobias Stoeckmann

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            tstoeckmann Tobias Stoeckmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: