svn commit: r1483700 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java
Author: lukaszlenart Date: Fri May 17 09:00:09 2013 New Revision: 1483700 URL: http://svn.apache.org/r1483700 Log: WW-4045 Reduces code duplication as FileManager can handle nulls Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java?rev=1483700&r1=1483699&r2=1483700&view=diff == --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java (original) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java Fri May 17 09:00:09 2013 @@ -335,7 +335,7 @@ public class DefaultActionValidatorManag private List loadFile(String fileName, Class clazz, boolean checkFile) { List retList = Collections.emptyList(); URL fileUrl = ClassLoaderUtil.getResource(fileName, clazz); -if ((checkFile && fileUrl != null && fileManager.fileNeedsReloading(fileUrl.toString())) || !validatorFileCache.containsKey(fileName)) { +if ((checkFile && fileManager.fileNeedsReloading(fileUrl)) || !validatorFileCache.containsKey(fileName)) { InputStream is = null; try {
svn commit: r1483773 - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/interceptor/ core/src/main/java/org/apache/struts2/util/ core/src/test/java/org/apache/struts2/util/ plugins/site
Author: lukaszlenart Date: Fri May 17 12:38:42 2013 New Revision: 1483773 URL: http://svn.apache.org/r1483773 Log: WW-4028 Extends ActionInvocation interface to support serialisation and deserialisation Added: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/mock/MockContainer.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsDecorator.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionInvocation.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/mock/MockActionInvocation.java struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/spring/interceptor/TestActionInvocation.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java?rev=1483773&r1=1483772&r2=1483773&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java Fri May 17 12:38:42 2013 @@ -137,7 +137,6 @@ public class TokenSessionStoreIntercepto if (savedInvocation != null) { // set the valuestack to the request scope ValueStack stack = savedInvocation.getStack(); -Map context = stack.getContext(); request.setAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY, stack); ActionContext savedContext = savedInvocation.getInvocationContext(); Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java?rev=1483773&r1=1483772&r2=1483773&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/InvocationSessionStore.java Fri May 17 12:38:42 2013 @@ -21,14 +21,14 @@ package org.apache.struts2.util; -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.util.ValueStack; +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + /** * InvocationSessionStore @@ -62,7 +62,7 @@ public class InvocationSessionStore { ValueStack stack = invocationContext.invocation.getStack(); ActionContext.getContext().setValueStack(stack); -return invocationContext.invocation; +return invocationContext.invocation.deserialize(ActionContext.getContext()); } /** @@ -73,7 +73,7 @@ public class InvocationSessionStore { * @param invocation */ public static void storeInvocation(String key, String token, ActionInvocation invocation) { -InvocationContext invocationContext = new InvocationContext(invocation, token); +InvocationContext invocationContext = new InvocationContext(invocation.serialize(), token); Map invocationMap = getInvocationMap(); invocationMap.put(key, invocationContext); setInvocationMap(invocationMap); Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java?rev=1483773&r1=1483772&r2=1483773&view=diff == --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java Fri May 17 12:38:42 2013 @@ -21,17 +21,15 @@ package org.apache.struts2.util; -import java.util.HashMap; -import java.util.Map; - -import org.apache.struts2.StrutsTestCase; - import
svn commit: r1483950 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
Author: lukaszlenart Date: Fri May 17 18:58:39 2013 New Revision: 1483950 URL: http://svn.apache.org/r1483950 Log: WW-4068 Extracts method to accept parameter names to allow easier overriding Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java?rev=1483950&r1=1483949&r2=1483950&view=diff == --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java (original) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java Fri May 17 18:58:39 2013 @@ -273,9 +273,6 @@ public class ParametersInterceptor exten } protected void setParameters(Object action, ValueStack stack, final Map parameters) { -ParameterNameAware parameterNameAware = (action instanceof ParameterNameAware) -? (ParameterNameAware) action : null; - Map params; Map acceptableParameters; if (ordered) { @@ -289,11 +286,7 @@ public class ParametersInterceptor exten for (Map.Entry entry : params.entrySet()) { String name = entry.getKey(); - -boolean acceptableName = acceptableName(name) -|| (parameterNameAware != null && parameterNameAware.acceptableParameterName(name)); - -if (acceptableName) { +if (isAcceptableParameter(name, action)) { acceptableParameters.put(name, entry.getValue()); } } @@ -347,6 +340,18 @@ public class ParametersInterceptor exten } /** + * Checks if name of parameter can be accepted or thrown away + * + * @param name parameter name + * @param action current action + * @return true if parameter is accepted + */ +protected boolean isAcceptableParameter(String name, Object action) { +ParameterNameAware parameterNameAware = (action instanceof ParameterNameAware) ? (ParameterNameAware) action : null; +return acceptableName(name) || (parameterNameAware != null && parameterNameAware.acceptableParameterName(name)); +} + +/** * Gets an instance of the comparator to use for the ordered sorting. Override this * method to customize the ordering of the parameters as they are set to the * action.
[CONF] Confluence Changes in the last 24 hours
This is a daily summary of all recent changes in Confluence. - Updated Spaces: - Apache ActiveMQ (https://cwiki.apache.org/confluence/display/ACTIVEMQ) Pages - Replicated LevelDB Store edited by chirino (10:21 AM) https://cwiki.apache.org/confluence/display/ACTIVEMQ/Replicated+LevelDB+Store Apache ActiveMQ CPP (https://cwiki.apache.org/confluence/display/AMQCPP) Pages - Download edited by tabish121 (11:30 AM) https://cwiki.apache.org/confluence/display/AMQCPP/Download ActiveMQ-CPP 3.7.0 Release edited by tabish121 (11:29 AM) https://cwiki.apache.org/confluence/display/AMQCPP/ActiveMQ-CPP+3.7.0+Release Apache Camel (https://cwiki.apache.org/confluence/display/CAMEL) Pages - Camel 2.12.0 Release edited by davsclaus (09:57 AM) https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.12.0+Release Krati edited by davsclaus (03:14 AM) https://cwiki.apache.org/confluence/display/CAMEL/Krati Apache Cloudstack (https://cwiki.apache.org/confluence/display/CLOUDSTACK) Pages - Feature Proposal - Linux native VXLAN support on KVM hypervisor created by toshiaki.hatano (06:09 PM) https://cwiki.apache.org/confluence/display/CLOUDSTACK/Feature+Proposal+-+Linux+native+VXLAN+support+on+KVM+hypervisor Granular Global Configuration Parameters edited by prashantkm (07:11 AM) https://cwiki.apache.org/confluence/display/CLOUDSTACK/Granular+++Global+Configuration+Parameters Storage Backup Object Store Plugin Framework edited by minc (01:03 AM) https://cwiki.apache.org/confluence/display/CLOUDSTACK/Storage+Backup+Object+Store+Plugin+Framework Support for Netscaler as external LB in VPC edited by sowmyak (12:19 AM) https://cwiki.apache.org/confluence/display/CLOUDSTACK/Support+for+Netscaler+as+external+LB+in+VPC Apache Curator (https://cwiki.apache.org/confluence/display/CURATOR) Pages - Example Emails edited by randgalt (04:49 PM) https://cwiki.apache.org/confluence/display/CURATOR/Example+Emails Apache CXF Documentation (https://cwiki.apache.org/confluence/display/CXF20DOC) Pages - XML Key Management Service (XKMS) edited by ashakirin (11:42 AM) https://cwiki.apache.org/confluence/display/CXF20DOC/XML+Key+Management+Service+%28XKMS%29 Apache Isis (https://cwiki.apache.org/confluence/display/ISIS) Pages - Generic Naked Objects app in JavaScript for Apache ISIS created by bhar...@apache.org (04:01 AM) https://cwiki.apache.org/confluence/display/ISIS/Generic+Naked+Objects+app+in+JavaScript+for+Apache+ISIS Apache Kafka (https://cwiki.apache.org/confluence/display/KAFKA) Pages - A Guide To The Kafka Protocol edited by lanzaa (01:46 PM) https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol KNOX (https://cwiki.apache.org/confluence/display/KNOX) Pages - Secure MapReduce edited by kminder (05:19 PM) https://cwiki.apache.org/confluence/display/KNOX/Secure+MapReduce Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action