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 2016/04/05 08:44:17 UTC

[1/3] struts git commit: Drops println

Repository: struts
Updated Branches:
  refs/heads/master 4b7426605 -> c12cd6194


Drops println


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/09e2d18c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/09e2d18c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/09e2d18c

Branch: refs/heads/master
Commit: 09e2d18c9a90cd0935d39183c546f99976955b44
Parents: 4b74266
Author: Lukasz Lenart <lu...@apache.org>
Authored: Mon Apr 4 12:34:10 2016 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Mon Apr 4 12:34:10 2016 +0200

----------------------------------------------------------------------
 .../xwork2/security/DefaultExcludedPatternsCheckerTest.java         | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/09e2d18c/core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java b/core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java
index faf807e..762dedf 100644
--- a/core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java
@@ -91,7 +91,6 @@ public class DefaultExcludedPatternsCheckerTest extends XWorkTestCase {
         }
 
         for (String param : params) {
-            System.out.println(param);
             // when
             ExcludedPatternsChecker.IsExcluded actual = checker.isExcluded(param);
 


[3/3] struts git commit: Adds support for multiple tiles defintions

Posted by lu...@apache.org.
Adds support for multiple tiles defintions


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/c12cd619
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c12cd619
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c12cd619

Branch: refs/heads/master
Commit: c12cd61946c883d7cadb69d46c46a3dffb339390
Parents: cfad2f1
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Apr 5 08:44:04 2016 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Apr 5 08:44:04 2016 +0200

----------------------------------------------------------------------
 .../tiles/StrutsTilesContainerFactory.java      | 23 ++++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/c12cd619/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
index fe90d75..a8e77ce 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java
@@ -19,6 +19,7 @@
 
 package org.apache.struts2.tiles;
 
+import com.opensymphony.xwork2.util.TextParseUtil;
 import ognl.OgnlException;
 import ognl.OgnlRuntime;
 import ognl.PropertyAccessor;
@@ -71,6 +72,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Dedicated Struts factory to build Tiles container with support for:
@@ -176,25 +178,28 @@ public class StrutsTilesContainerFactory extends BasicTilesContainerFactory {
 
     @Override
     protected List<ApplicationResource> getSources(ApplicationContext applicationContext) {
-        Collection<ApplicationResource> resources = applicationContext.getResources(getTilesDefinitionPattern(applicationContext.getInitParams()));
+        Collection<ApplicationResource> resources = new ArrayList<>();
+
+        Set<String> definitions = getTilesDefinitions(applicationContext.getInitParams());
+        for (String definition : definitions) {
+            resources.addAll(applicationContext.getResources(definition));
+        }
 
         List<ApplicationResource> filteredResources = new ArrayList<>();
-        if (resources != null) {
-            for (ApplicationResource resource : resources) {
-                if (Locale.ROOT.equals(resource.getLocale())) {
-                    filteredResources.add(resource);
-                }
+        for (ApplicationResource resource : resources) {
+            if (Locale.ROOT.equals(resource.getLocale())) {
+                filteredResources.add(resource);
             }
         }
 
         return filteredResources;
     }
 
-    protected String getTilesDefinitionPattern(Map<String, String> params) {
+    protected Set<String> getTilesDefinitions(Map<String, String> params) {
         if (params.containsKey(DefinitionsFactory.DEFINITIONS_CONFIG)) {
-            return params.get(DefinitionsFactory.DEFINITIONS_CONFIG);
+            return TextParseUtil.commaDelimitedStringToSet(params.get(DefinitionsFactory.DEFINITIONS_CONFIG));
         }
-        return TILES_DEFAULT_PATTERN;
+        return TextParseUtil.commaDelimitedStringToSet(TILES_DEFAULT_PATTERN);
     }
 
     protected ELAttributeEvaluator createELEvaluator(ApplicationContext applicationContext) {


[2/3] struts git commit: Adds proper toString implementation

Posted by lu...@apache.org.
Adds proper toString implementation


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/cfad2f1d
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/cfad2f1d
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/cfad2f1d

Branch: refs/heads/master
Commit: cfad2f1d35364c9144a81832be8028f148a504f5
Parents: 09e2d18
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Apr 5 08:43:46 2016 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Apr 5 08:43:46 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/struts2/tiles/StrutsApplicationResource.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/cfad2f1d/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
index 6884e9a..4ff5b54 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsApplicationResource.java
@@ -52,4 +52,8 @@ public class StrutsApplicationResource extends PostfixedApplicationResource {
         return 0;
     }
 
+    @Override
+    public String toString() {
+        return "Resource " + getLocalePath() + " at " + url.toString();
+    }
 }