You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ku...@apache.org on 2023/11/15 05:06:39 UTC

(struts) 01/01: WW-5363 Remove redundant method from VelocityManager

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

kusal pushed a commit to branch WW-5363-velocity-order-2
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 75b72e592e19ad1e5c55a6eeb18ecdd95695fe34
Author: Kusal Kithul-Godage <gi...@kusal.io>
AuthorDate: Wed Nov 15 16:06:24 2023 +1100

    WW-5363 Remove redundant method from VelocityManager
---
 .../org/apache/struts2/views/velocity/StrutsVelocityContext.java | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java
index 99be98b15..4241f6ead 100644
--- a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java
+++ b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java
@@ -77,7 +77,7 @@ public class StrutsVelocityContext extends VelocityContext {
     }
 
     protected List<Function<String, Object>> contextGetterList() {
-        return Arrays.asList(this::superGet, this::chainedContextGet, this::stackGet, this::stackContextGet);
+        return Arrays.asList(this::superGet, this::chainedContextGet, this::stackGet);
     }
 
     protected Object superGet(String key) {
@@ -91,13 +91,6 @@ public class StrutsVelocityContext extends VelocityContext {
         return stack.findValue(key);
     }
 
-    protected Object stackContextGet(String key) {
-        if (stack == null) {
-            return null;
-        }
-        return stack.getContext().get(key);
-    }
-
     protected Object chainedContextGet(String key) {
         if (chainedContexts == null) {
             return null;