struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [4/4] git commit: Adds conversion of Struts property to XWork property
Date Fri, 25 Apr 2014 13:00:13 GMT
Adds conversion of Struts property to XWork property


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/aff3a3a6
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/aff3a3a6
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/aff3a3a6

Branch: refs/heads/feature/exclude-object-class
Commit: aff3a3a625dc89f93f5b6548887245ffd6bba3d3
Parents: 14ad0ab
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Apr 25 14:59:38 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Apr 25 14:59:38 2014 +0200

----------------------------------------------------------------------
 core/src/main/java/org/apache/struts2/StrutsConstants.java       | 4 ++++
 .../org/apache/struts2/config/DefaultBeanSelectionProvider.java  | 1 +
 core/src/main/resources/struts-default.xml                       | 3 +++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/aff3a3a6/core/src/main/java/org/apache/struts2/StrutsConstants.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java
index 3423ec8..6be58ad 100644
--- a/core/src/main/java/org/apache/struts2/StrutsConstants.java
+++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java
@@ -281,4 +281,8 @@ public final class StrutsConstants {
 
     /** Allows override default DispatcherErrorHandler **/
     public static final String STRUTS_DISPATCHER_ERROR_HANDLER = "struts.dispatcher.errorHandler";
+
+    /** Comma delimited set of excluded properties which cannot be accessed via expressions
**/
+    public static final String STRUTS_EXCLUDED_PROPERTIES = "struts.excludedProperties";
+
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/aff3a3a6/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
index b6b5b45..4cc2d61 100644
--- a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
+++ b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java
@@ -391,6 +391,7 @@ public class DefaultBeanSelectionProvider extends AbstractBeanSelectionProvider
         convertIfExist(props, StrutsConstants.STRUTS_ENABLE_OGNL_EVAL_EXPRESSION, XWorkConstants.ENABLE_OGNL_EVAL_EXPRESSION);
         convertIfExist(props, StrutsConstants.STRUTS_ALLOW_STATIC_METHOD_ACCESS, XWorkConstants.ALLOW_STATIC_METHOD_ACCESS);
         convertIfExist(props, StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, XWorkConstants.RELOAD_XML_CONFIGURATION);
+        convertIfExist(props, StrutsConstants.STRUTS_EXCLUDED_PROPERTIES, XWorkConstants.OGNL_EXCLUDED_PROPERTIES);
 
         LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");
         loadCustomResourceBundles(props);

http://git-wip-us.apache.org/repos/asf/struts/blob/aff3a3a6/core/src/main/resources/struts-default.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/struts-default.xml b/core/src/main/resources/struts-default.xml
index 87f1ff5..7cb687e 100644
--- a/core/src/main/resources/struts-default.xml
+++ b/core/src/main/resources/struts-default.xml
@@ -37,6 +37,9 @@
     "http://struts.apache.org/dtds/struts-2.3.dtd">
 
 <struts>
+
+    <constant name="struts.excludedProperties" value="getClass,class,hashCode,toString,clone,equals,finalize,notify,notifyAll,wait"
/>
+
     <bean class="com.opensymphony.xwork2.ObjectFactory" name="struts"/>
     <bean type="com.opensymphony.xwork2.factory.ResultFactory" name="struts" class="org.apache.struts2.factory.StrutsResultFactory"
/>
     <bean type="com.opensymphony.xwork2.factory.ActionFactory" name="struts" class="com.opensymphony.xwork2.factory.DefaultActionFactory"
/>


Mime
View raw message