You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Tobias Stoeckmann (JIRA)" <ji...@apache.org> on 2016/02/11 17:52:18 UTC

[jira] [Created] (OWB-1118) Producer Fields don't work with Interceptors

Tobias Stoeckmann created OWB-1118:
--------------------------------------

             Summary: Producer Fields don't work with Interceptors
                 Key: OWB-1118
                 URL: https://issues.apache.org/jira/browse/OWB-1118
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.6.2
            Reporter: Tobias Stoeckmann
         Attachments: producer-field.tar.gz

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)