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 2020/04/28 06:14:53 UTC

[struts] 01/02: WW-4789 WW-3788 Uses full variable name

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch action-context-boost
in repository https://gitbox.apache.org/repos/asf/struts.git

commit a504a16eae6b9db08e70908f030c1483c201ed4e
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Apr 28 08:01:26 2020 +0200

    WW-4789 WW-3788 Uses full variable name
---
 .../org/apache/struts2/interceptor/ScopeInterceptor.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
index 08afd6e..e9d09dc 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/ScopeInterceptor.java
@@ -262,9 +262,9 @@ public class ScopeInterceptor extends AbstractInterceptor implements PreResultLi
     }
 
     protected void after(ActionInvocation invocation, String result) throws Exception {
-        Map<String, Object> ses = ActionContext.getContext().getSession();
-        if ( ses != null) {
-            unlock(ses);
+        Map<String, Object> session = ActionContext.getContext().getSession();
+        if ( session != null) {
+            unlock(session);
         }
     }
 
@@ -282,14 +282,14 @@ public class ScopeInterceptor extends AbstractInterceptor implements PreResultLi
         }
 
         String key = getKey(invocation);
-        Map<String, Object> app = ActionContext.getContext().getApplication();
+        Map<String, Object> application = ActionContext.getContext().getApplication();
         final ValueStack stack = ActionContext.getContext().getValueStack();
 
         LOG.debug("scope interceptor before");
 
-        if (application != null)
-            for (String string : application) {
-                Object attribute = app.get(key + string);
+        if (this.application != null)
+            for (String string : this.application) {
+                Object attribute = application.get(key + string);
                 if (attribute != null) {
                     LOG.debug("Application scoped variable set {} = {}", string, String.valueOf(attribute));
                     stack.setValue(string, nullConvert(attribute));