svn commit: r1502443 - /struts/struts2/trunk/plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:05:33 2013
New Revision: 1502443

URL: http://svn.apache.org/r1502443
Log:
WW-4125 Improves loop and minor changes

Modified:

struts/struts2/trunk/plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java

Modified: 
struts/struts2/trunk/plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java?rev=1502443&r1=1502442&r2=1502443&view=diff
==
--- 
struts/struts2/trunk/plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java
 (original)
+++ 
struts/struts2/trunk/plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java
 Fri Jul 12 07:05:33 2013
@@ -21,21 +21,22 @@
 
 package org.apache.struts2.s1;
 
-import com.opensymphony.xwork2.*;
+import com.opensymphony.xwork2.TextProvider;
+import com.opensymphony.xwork2.ValidationAware;
 import com.opensymphony.xwork2.config.Configuration;
 import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
 import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
+import com.opensymphony.xwork2.config.entities.ResultConfig;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.config.ExceptionConfig;
+import org.apache.struts.config.ModuleConfig;
 
-import org.apache.struts.Globals;
-import org.apache.struts.action.*;
-import org.apache.struts.config.*;
-
-import java.util.Iterator;
 import java.util.Arrays;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
+import java.util.Iterator;
 
 
 /**
@@ -120,32 +121,28 @@ public class Struts1Factory {
 if (action instanceof TextProvider) {
 text = (TextProvider)action;
 }
-
-ActionMessage error = null;
-String field = null;
-String msg = null;
-Object[] values = null;
+// if there is no ValidationAware, it doesn't make sense to process 
messages
+// as there be no place to put message in
+if (vaction == null) {
+return;
+}
 for (Iterator i = errors.properties(); i.hasNext(); ) {
-field = (String) i.next();
+String field = (String) i.next();
 for (Iterator it = errors.get(field); it.hasNext(); ) {
-error = (ActionMessage) it.next();
-msg = error.getKey();
+ActionMessage error = (ActionMessage) it.next();
+String msg = error.getKey();
 if (error.isResource() && text != null) {
-values = error.getValues();
+Object[] values = error.getValues();
 if (values != null) {
 msg = text.getText(error.getKey(), 
Arrays.asList(values));
 } else {
 msg = text.getText(error.getKey());
 }
 }
-if (vaction != null) {
-if (field == errors.GLOBAL_MESSAGE) {
-vaction.addActionError(msg);
-} else {
-vaction.addFieldError(field, msg);
-}
+if (ActionMessages.GLOBAL_MESSAGE.equals(field)) {
+vaction.addActionError(msg);
 } else {
-// should do something here
+vaction.addFieldError(field, msg);
 }
 }
 }




svn commit: r1502446 - /struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:09:42 2013
New Revision: 1502446

URL: http://svn.apache.org/r1502446
Log:
WW-4124 Improves loop

Modified:

struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java

Modified: 
struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java?rev=1502446&r1=1502445&r2=1502446&view=diff
==
--- 
struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
 (original)
+++ 
struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
 Fri Jul 12 07:09:42 2013
@@ -1036,6 +1036,9 @@ class Validator {
 el = ELParser.parse(attrs.getValue(i));
 Iterator nodes = el.iterator();
 while (nodes.hasNext()) {
+if (elExpression && deferredValueIsLiteral) {
+break;
+}
 ELNode node = nodes.next();
 if (node instanceof ELNode.Root) {
 if (((ELNode.Root) node).getType() == '$') {




svn commit: r1502447 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:13:11 2013
New Revision: 1502447

URL: http://svn.apache.org/r1502447
Log:
WW-4123 Improves loops

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java?rev=1502447&r1=1502446&r2=1502447&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptorUtil.java
 Fri Jul 12 07:13:11 2013
@@ -19,7 +19,6 @@ import com.opensymphony.xwork2.util.Text
 import com.opensymphony.xwork2.util.WildcardHelper;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Set;
 
 /**
@@ -51,16 +50,17 @@ public class MethodFilterInterceptorUtil
 
 // quick check to see if any actual pattern matching is needed
 boolean needsPatternMatch = false;
-Iterator quickIter = includeMethods.iterator();
-for (String incMeth : includeMethods) {
-if (!"*".equals(incMeth) && incMeth.contains("*")) {
+for (String includeMethod : includeMethods) {
+if (!"*".equals(includeMethod) && includeMethod.contains("*")) {
 needsPatternMatch = true;
+break;
 }
 }
 
-for (String incMeth : excludeMethods) {
-if (!"*".equals(incMeth) && incMeth.contains("*")) {
+for (String excludeMethod : excludeMethods) {
+if (!"*".equals(excludeMethod) && excludeMethod.contains("*")) {
 needsPatternMatch = true;
+break;
 }
 }
 




svn commit: r1502449 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationParameterFilterIntereptor.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:14:18 2013
New Revision: 1502449

URL: http://svn.apache.org/r1502449
Log:
WW-4122 Improves loop

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationParameterFilterIntereptor.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationParameterFilterIntereptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationParameterFilterIntereptor.java?rev=1502449&r1=1502448&r2=1502449&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationParameterFilterIntereptor.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationParameterFilterIntereptor.java
 Fri Jul 12 07:14:18 2013
@@ -60,6 +60,7 @@ public class AnnotationParameterFilterIn
 //i.e take param name up to first . (period) and match 
against that
 if (field.getName().equals(paramName)) {
 allowed = true;
+break;
 }
 }
 




svn commit: r1502451 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:16:32 2013
New Revision: 1502451

URL: http://svn.apache.org/r1502451
Log:
WW-4121 Improves loop

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java?rev=1502451&r1=1502450&r2=1502451&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/RolesInterceptor.java
 Fri Jul 12 07:16:32 2013
@@ -21,19 +21,17 @@
 
 package org.apache.struts2.interceptor;
 
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.apache.struts2.ServletActionContext;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-
-import org.apache.struts2.ServletActionContext;
-
 /**
  *  This interceptor ensures that the action
  * will only be executed if the user has the correct role. 

svn commit: r1502452 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:17:39 2013
New Revision: 1502452

URL: http://svn.apache.org/r1502452
Log:
WW-4119 Improves loop

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java?rev=1502452&r1=1502451&r2=1502452&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java
 Fri Jul 12 07:17:39 2013
@@ -124,6 +124,7 @@ public class ModelDrivenInterceptor exte
 for (Object item : root) {
 if (item.equals(newModel)) {
 needsRefresh = false;
+break;
 }
 }
 




svn commit: r1502453 - /struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java

2013-07-12 Thread lukaszlenart
Author: lukaszlenart
Date: Fri Jul 12 07:18:54 2013
New Revision: 1502453

URL: http://svn.apache.org/r1502453
Log:
WW-4120 Improves loop

Modified:

struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java

Modified: 
struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java?rev=1502453&r1=1502452&r2=1502453&view=diff
==
--- 
struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
 (original)
+++ 
struts/struts2/trunk/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Validator.java
 Fri Jul 12 07:18:54 2013
@@ -1384,9 +1384,11 @@ class Validator {
 if (node instanceof ELNode.Root) {
 if (((ELNode.Root) node).getType() == '$') {
 elExpression = true;
+break;
 } else if (checkDeferred && 
!pageInfo.isDeferredSyntaxAllowedAsLiteral() 
 && ((ELNode.Root) node).getType() == '#') {
 elExpression = true;
+break;
 }
 }
 }




[CONF] Confluence Changes in the last 24 hours

2013-07-12 Thread Anonymous (Confluence)







   Apache ActiveMQ


Pages

 Page:
 Message Redelivery and DLQ Handling
edited by Jakub Korab[10:23 AM]
(view changes)



   Apache Ambari (Incubating)


Pages

 Page:
 Adding a New Service to an Existing Cluster
edited by Siddharth Wagle[01:38 AM]
(view changes)



   Apache ActiveMQ CPP


Pages

 Page:
 Download
edited by Timothy Bish[01:29 PM]
(view changes)

 Page:
 ActiveMQ-CPP 3.7.1 Release
edited by Timothy Bish[01:28 PM]
(view changes)



   Apache Camel


Pages

 Page:
 Camel 2.12.0 Release
edited by Claus Ibsen[06:33 AM]
(view changes)



   Apache Cloudstack


Pages

 Page:
 KVM 6.3 snapshot test execution
edited by angie shen[11:06 PM]
(view changes)

 Page:
 Object Storage Dev-Test Environments
created by John Burwell[02:25 PM]

 Page:
 Portable IP Test Execution
edited by venkata swamybabu budumuru[12:51 PM]
(view changes)

 Page:
 Usage metering for Direct Network
created by Kishan Kavala[12:03 PM]

 Page:
 Object Store Test Execution
edited by Abhinav Roy[11:12 AM]
(view changes)

 Page:
 over commit CPUand Memory
edited by prashant kumar mishra[10:50 AM]
(view changes)

 Page:
 Useful Tips and Tricks
edited by Sailaja Mada[09:15 AM]
(view changes)

 Page:
 TestPlan for "Better control over first class objects in CloudStack"
created by venkata swamybabu budumuru[06:58 AM]

 Page:
 Reset SSH keys for VM
edited by suresh sadhu[06:56 AM]
(view changes)

 Page:
 Copy of KVM 6.3 snapshot test execution
created by angie shen[01:19 AM]



   Apache CXF Documentation


Pages

 Page:
 3.0 Migration Guide
edited by Daniel Kulp[04:20 PM]
(view changes)

 Page:
 JAX-RS Deployment
edited by Sergey Beryozkin[02:37 PM]
(view changes)

 Pag