[ 
https://issues.apache.org/jira/browse/WW-4827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194197#comment-16194197
 ] 

Hudson commented on WW-4827:
----------------------------

SUCCESS: Integrated in Jenkins build Struts-master-JDK7 #32 (See 
[https://builds.apache.org/job/Struts-master-JDK7/32/])
Reverts changes introduced with WW-4827 and adds default constructors 
(lukaszlenart: rev 2acf0ab16ea48f2c7d6acbeb8535cc4d669186fd)
* (edit) core/src/main/java/com/opensymphony/xwork2/ObjectFactory.java
* (edit) 
core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
* (edit) core/src/test/java/com/opensymphony/xwork2/ProxyObjectFactory.java
* (edit) 
plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
* (edit) plugins/cdi/src/main/java/org/apache/struts2/cdi/CdiObjectFactory.java
* (edit) 
core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
* (edit) 
plugins/osgi/src/main/java/org/apache/struts2/osgi/DelegatingObjectFactory.java
* (edit) 
plugins/osgi/src/main/java/org/apache/struts2/osgi/SpringOsgiObjectFactory.java
* (edit) core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java
* (edit) 
core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
* (edit) 
core/src/test/java/com/opensymphony/xwork2/interceptor/ScopedModelDrivenInterceptorTest.java
* (edit) 
plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
* (edit) 
plugins/convention/src/test/java/org/apache/struts2/convention/PackageBasedActionConfigBuilderTest.java
* (edit) 
plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java


> Not fully initialized ObjectFactory tries to create beans
> ---------------------------------------------------------
>
>                 Key: WW-4827
>                 URL: https://issues.apache.org/jira/browse/WW-4827
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.5.12
>            Reporter: Aleksandr Mashchenko
>            Assignee: Lukasz Lenart
>            Priority: Critical
>             Fix For: 2.5.13
>
>
> This leads to issues when properties aren't injected in some cases, for 
> example in custom type converters.
> The problem happens when {{ObjectFactory}} tries to create a bean in the same 
> time not being fully initialized itself (e.g. {{ConverterFactory}} injected 
> before {{Container}}).
> The issue happens more often under linux (all the time basically) than under 
> windows, so it cannot be reproduced 100%. This behavior boils down to the 
> fact that {{clazz.getDeclaredMethods()}} is used to get methods which needs 
> to be injected and {{clazz.getDeclaredMethods()}} returned elements are - 
> _The elements in the array returned are not sorted and are not in any 
> particular order._
> Proposed solution moves Container injection from method to constructor in 
> ObjectFactory -  
> https://github.com/aleksandr-m/struts/commit/6f91d0776a545c911ca4f2875ed9976614711ef9.
> The downside is it isn't backward-compatible, custom object factories must be 
> updated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to