struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1405930 - in /struts/struts2/trunk/xwork-core/src: main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java test/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactoryTest.java
Date Mon, 05 Nov 2012 20:04:35 GMT
Author: lukaszlenart
Date: Mon Nov  5 20:04:35 2012
New Revision: 1405930

URL: http://svn.apache.org/viewvc?rev=1405930&view=rev
Log:
WW-3914 solves problem with returning always system implementation of FileManager

Modified:
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
    struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactoryTest.java

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java?rev=1405930&r1=1405929&r2=1405930&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
(original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactory.java
Mon Nov  5 20:04:35 2012
@@ -56,11 +56,9 @@ public class DefaultFileManagerFactory i
         if (LOG.isDebugEnabled()) {
             LOG.debug("No user defined FileManager, looking up for internal implementations!");
         }
-        if (fileManager == null) {
-            for (FileManager fm : internals) {
-                if (fm.support()) {
-                    return fm;
-                }
+        for (FileManager fm : internals) {
+            if (fm.support()) {
+                return fm;
             }
         }
         if (LOG.isDebugEnabled()) {

Modified: struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactoryTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactoryTest.java?rev=1405930&r1=1405929&r2=1405930&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactoryTest.java
(original)
+++ struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/util/fs/DefaultFileManagerFactoryTest.java
Mon Nov  5 20:04:35 2012
@@ -35,6 +35,7 @@ public class DefaultFileManagerFactoryTe
         // given
         fileManager = new DummyFileManager();
         DefaultFileManagerFactory factory = new DefaultFileManagerFactory();
+        factory.setFileManager(new DefaultFileManager());
         factory.setContainer(new DummyContainer());
 
         // when



Mime
View raw message