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 2018/04/17 05:49:06 UTC
[struts] branch struts-2-4 updated: Uses conditional parse
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch struts-2-4
in repository https://gitbox.apache.org/repos/asf/struts.git
The following commit(s) were added to refs/heads/struts-2-4 by this push:
new 0dd62bb Uses conditional parse
0dd62bb is described below
commit 0dd62bb4552f6cf8e8256119810f3e5908c3f0d3
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Apr 17 07:48:59 2018 +0200
Uses conditional parse
---
.../src/main/java/com/opensymphony/xwork2/ActionChainResult.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
index 170c567..02225ec 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
@@ -197,13 +197,10 @@ public class ActionChainResult implements Result {
* @param invocation the DefaultActionInvocation calling the action call stack
*/
public void execute(ActionInvocation invocation) throws Exception {
- // if the finalNamespace wasn't explicitly defined, assume the current one
- if (this.namespace == null) {
- this.namespace = invocation.getProxy().getNamespace();
- }
-
ValueStack stack = ActionContext.getContext().getValueStack();
- String finalNamespace = TextParseUtil.translateVariables(namespace, stack);
+ String finalNamespace = this.namespace != null
+ ? TextParseUtil.translateVariables(namespace, stack)
+ : invocation.getProxy().getNamespace();
String finalActionName = TextParseUtil.translateVariables(actionName, stack);
String finalMethodName = this.methodName != null
? TextParseUtil.translateVariables(this.methodName, stack)
--
To stop receiving notification emails like this one, please contact
lukaszlenart@apache.org.