You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2011/10/11 08:00:57 UTC

svn commit: r1181629 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java

Author: lukaszlenart
Date: Tue Oct 11 06:00:56 2011
New Revision: 1181629

URL: http://svn.apache.org/viewvc?rev=1181629&view=rev
Log:
WW-3692 - uses containsBean() method instead of containsBeanDefinition() to resolve aliases of a bean to find

Modified:
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java?rev=1181629&r1=1181628&r2=1181629&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java Tue Oct 11 06:00:56 2011
@@ -145,9 +145,9 @@ public class SpringObjectFactory extends
      */
     @Override
     public Object buildBean(String beanName, Map<String, Object> extraContext, boolean injectInternal) throws Exception {
-        Object o = null;
+        Object o;
         
-        if (appContext.containsBeanDefinition(beanName)) {
+        if (appContext.containsBean(beanName)) {
             o = appContext.getBean(beanName);
         } else {
             Class beanClazz = getClassInstance(beanName);