Github user yasserzamani commented on the issue:

    https://github.com/apache/struts/pull/153
  
    To keep `backward-compatible` if is very important, I think we may have 
following:
    
    
    ```java
    protected Object injectInternalBeans(Object obj) {
        if (obj != null) {
            if(container != null) container.inject(obj);
            else myPrivateInjectQueue.add(obj);
        }
        return obj;
    }
                
    @Inject             
    public void setContainer(Container container) {             
        this.container = container;
        if(null != this.container && myPrivateInjectQueue.getCount()>0)
        {
            foreach(Object obj in myPrivateInjectQueue) 
this.container.inject(obj);
            myPrivateInjectQueue.clear();
        }               
    }
    ```
    
    However I never tried and tested it but I can if you would like.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to