struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [struts] 03/13: Increases scope when location parsing is avoided
Date Fri, 24 Aug 2018 08:34:28 GMT
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 8d86442ce787358f940996eabfb49c548a4b6d34
Author: Lukasz Lenart <lukaszlenart@apache.org>
AuthorDate: Wed May 2 08:25:06 2018 +0200

    Increases scope when location parsing is avoided
---
 core/src/main/java/org/apache/struts2/result/PostbackResult.java       | 2 +-
 .../java/org/apache/struts2/result/ServletActionRedirectResult.java    | 2 +-
 .../org/apache/struts2/portlet/result/PortletActionRedirectResult.java | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/src/main/java/org/apache/struts2/result/PostbackResult.java b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
index 4c1e52a..1a275d5 100644
--- a/core/src/main/java/org/apache/struts2/result/PostbackResult.java
+++ b/core/src/main/java/org/apache/struts2/result/PostbackResult.java
@@ -134,9 +134,9 @@ public class PostbackResult extends StrutsResultSupport {
 
         if (actionName != null) {
             actionName = conditionalParse(actionName, invocation);
+            parseLocation = false;
             if (namespace == null) {
                 namespace = invocation.getProxy().getNamespace();
-                parseLocation = false;
             } else {
                 namespace = conditionalParse(namespace, invocation);
             }
diff --git a/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java
b/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java
index 5b800e2..ed6825b 100644
--- a/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java
+++ b/core/src/main/java/org/apache/struts2/result/ServletActionRedirectResult.java
@@ -159,9 +159,9 @@ public class ServletActionRedirectResult extends ServletRedirectResult
implement
      */
     public void execute(ActionInvocation invocation) throws Exception {
         actionName = conditionalParse(actionName, invocation);
+        parseLocation = false;
         if (namespace == null) {
             namespace = invocation.getProxy().getNamespace();
-            parseLocation = false;
         } else {
             namespace = conditionalParse(namespace, invocation);
         }
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
index db4f98a..282f653 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
@@ -172,6 +172,8 @@ public class PortletActionRedirectResult extends PortletResult {
 	 */
 	public void execute(ActionInvocation invocation) throws Exception {
 		actionName = conditionalParse(actionName, invocation);
+		parseLocation = false;
+
 		String portletNamespace = (String)invocation.getInvocationContext().get(PortletConstants.PORTLET_NAMESPACE);
 		if (portletMode != null) {
 			Map<PortletMode, String> namespaceMap = getNamespaceMap(invocation);
@@ -179,7 +181,6 @@ public class PortletActionRedirectResult extends PortletResult {
 		}
 		if (namespace == null) {
 			namespace = invocation.getProxy().getNamespace();
-			parseLocation = false;
 		} else {
 			namespace = conditionalParse(namespace, invocation);
 		}


Mime
View raw message