(struts) 03/03: WW-5326 Uses StrutsContext instead of raw Map as OgnlContext

2025-03-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch feature/WW-5326-ognl
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 9c0ba314477d222c9f67eb880e36ec508ba5eb74
Author: Lukasz Lenart 
AuthorDate: Sun Mar 30 08:49:18 2025 +0200

WW-5326 Uses StrutsContext instead of raw Map as OgnlContext
---
 .../org/apache/struts2/conversion/NullHandler.java |   6 +-
 .../conversion/impl/InstantiatingNullHandler.java  |   7 +-
 .../org/apache/struts2/factory/ResultFactory.java  |   3 +-
 .../struts2/factory/StrutsResultFactory.java   |   7 +-
 .../struts2/ognl/OgnlNullHandlerWrapper.java   |   7 +-
 .../struts2/ognl/OgnlReflectionProvider.java   |  30 +++
 .../struts2/ognl/OgnlTypeConverterWrapper.java |   3 +-
 .../java/org/apache/struts2/ognl/OgnlUtil.java | 100 +
 .../org/apache/struts2/ognl/OgnlValueStack.java|  14 +--
 .../apache/struts2/ognl/SecurityMemberAccess.java  |   7 +-
 .../ognl/accessor/CompoundRootAccessor.java|  43 -
 .../accessor/HttpParametersPropertyAccessor.java   |   7 +-
 .../struts2/ognl/accessor/ObjectAccessor.java  |  12 +--
 .../ognl/accessor/ObjectProxyPropertyAccessor.java |   6 +-
 .../ognl/accessor/ParameterPropertyAccessor.java   |   5 +-
 .../accessor/XWorkCollectionPropertyAccessor.java  |  14 +--
 .../ognl/accessor/XWorkEnumerationAccessor.java|   3 +-
 .../accessor/XWorkIteratorPropertyAccessor.java|   4 +-
 .../ognl/accessor/XWorkMapPropertyAccessor.java|   9 +-
 .../struts2/ognl/accessor/XWorkMethodAccessor.java |  94 ++-
 .../ognl/accessor/XWorkObjectPropertyAccessor.java |   4 +-
 .../java/org/apache/struts2/util/ValueStack.java   |   3 +-
 .../util/reflection/ReflectionProvider.java|  19 ++--
 23 files changed, 194 insertions(+), 213 deletions(-)

diff --git a/core/src/main/java/org/apache/struts2/conversion/NullHandler.java 
b/core/src/main/java/org/apache/struts2/conversion/NullHandler.java
index 2eb2ed06f..3db4afefd 100644
--- a/core/src/main/java/org/apache/struts2/conversion/NullHandler.java
+++ b/core/src/main/java/org/apache/struts2/conversion/NullHandler.java
@@ -18,6 +18,8 @@
  */
 package org.apache.struts2.conversion;
 
+import org.apache.struts2.ognl.StrutsContext;
+
 import java.util.Map;
 
 /**
@@ -41,7 +43,7 @@ public interface NullHandler
  *
  *  @return object
  */
-Object nullMethodResult(Map context, Object target, String 
methodName, Object[] args);
+Object nullMethodResult(StrutsContext context, Object target, String 
methodName, Object[] args);
 
 /**
  *   Property in target evaluated to null.  Property can be a constant
@@ -53,5 +55,5 @@ public interface NullHandler
  *
  *  @return object
  */
-Object nullPropertyValue(Map context, Object target, 
Object property);
+Object nullPropertyValue(StrutsContext context, Object target, Object 
property);
 }
\ No newline at end of file
diff --git 
a/core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java
 
b/core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java
index 52ebdd836..e00c5f55f 100644
--- 
a/core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java
+++ 
b/core/src/main/java/org/apache/struts2/conversion/impl/InstantiatingNullHandler.java
@@ -22,6 +22,7 @@ import org.apache.struts2.ObjectFactory;
 import org.apache.struts2.conversion.NullHandler;
 import org.apache.struts2.conversion.ObjectTypeDeterminer;
 import org.apache.struts2.inject.Inject;
+import org.apache.struts2.ognl.StrutsContext;
 import org.apache.struts2.util.reflection.ReflectionContextState;
 import org.apache.struts2.util.reflection.ReflectionProvider;
 import org.apache.logging.log4j.LogManager;
@@ -97,12 +98,14 @@ public class InstantiatingNullHandler implements 
NullHandler {
 this.objectFactory = fac;
 }
 
-public Object nullMethodResult(Map context, Object target, 
String methodName, Object[] args) {
+@Override
+public Object nullMethodResult(StrutsContext context, Object target, 
String methodName, Object[] args) {
 LOG.debug("Entering nullMethodResult");
 return null;
 }
 
-public Object nullPropertyValue(Map context, Object 
target, Object property) {
+@Override
+public Object nullPropertyValue(StrutsContext context, Object target, 
Object property) {
 LOG.debug("Entering nullPropertyValue [target={}, property={}]", 
target, property);
 boolean c = ReflectionContextState.isCreatingNullObjects(context);
 
diff --git a/core/src/main/java/org/apache/struts2/factory/ResultFactory.java 
b/core/src/main/java/org/apache/struts2/factory/ResultFactory.java
index 88331feba..866ded1e7 100644
--- a/core/src/main/java/org/apache/struts2/factory/ResultFactory.java
+++ b/core/src/main/java/org/apache/struts2/factory/ResultFactory.java
@@ -19,6 +19,7 @@
 package o

(struts) 01/03: WW-5326 Upgrades to OGNL 3.4.6

2025-03-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch feature/WW-5326-ognl
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 7823fa4b89cedb54996e87c8c53364759381919f
Author: Lukasz Lenart 
AuthorDate: Sun Mar 30 08:48:39 2025 +0200

WW-5326 Upgrades to OGNL 3.4.6
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7fbfb6bd6..07f01c7d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,7 +120,7 @@
 2.24.3
 3.5.2
 5.15.2
-3.3.5
+3.4.6
 2.0.16
 6.2.3
 3.1



(struts) branch feature/WW-5326-ognl created (now 9c0ba3144)

2025-03-29 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch feature/WW-5326-ognl
in repository https://gitbox.apache.org/repos/asf/struts.git


  at 9c0ba3144 WW-5326 Uses StrutsContext instead of raw Map as OgnlContext

This branch includes the following new commits:

 new 7823fa4b8 WW-5326 Upgrades to OGNL 3.4.6
 new ae8234eb7 WW-5326 Introduces a dedicate Struts context to be used with 
OGNL
 new 9c0ba3144 WW-5326 Uses StrutsContext instead of raw Map as OgnlContext

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




struts.git: Error while running github feature from feature/WW-5326-ognl:.asf.yaml

2025-03-29 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.



struts.git: Error while running github feature from main:.asf.yaml

2025-03-29 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.