You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2010/01/22 16:17:21 UTC
[jira] Commented: (OWB-246) BeanManager#getReference must create a
bean with resolved dependencies
[ https://issues.apache.org/jira/browse/OWB-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803722#action_12803722 ]
Mark Struberg commented on OWB-246:
-----------------------------------
Oki, got a bit confused and found the real source of the problem.
Since a contextual reference is obviously a proxy all those fields are initially null.
The problem is that we do _not_ proxy field access but only method access.
Assuming we have a Bean
{noformat}
public class MyBean {
private @Inject MyService svc;
public int getValueFromService() {
svc.getValue();
}
}
{noformat}
currently fails with a NullPointerException
All works well if I use a getter for accessing svc via getMyService() in #getValueFromService();
> BeanManager#getReference must create a bean with resolved dependencies
> ----------------------------------------------------------------------
>
> Key: OWB-246
> URL: https://issues.apache.org/jira/browse/OWB-246
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Context and Scopes
> Affects Versions: M3
> Reporter: Mark Struberg
> Assignee: Gurkan Erdogdu
>
> currently a bean reference will get returned but it all @Inject fields are null
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.