You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ja...@apache.org on 2011/06/03 02:17:28 UTC

svn commit: r1130878 - in /struts/struts2/trunk: ./ core/src/main/java/org/apache/struts2/interceptor/ core/src/main/java/org/apache/struts2/interceptor/debugging/ xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/ xwork-core/src...

Author: jafl
Date: Fri Jun  3 00:17:27 2011
New Revision: 1130878

URL: http://svn.apache.org/viewvc?rev=1130878&view=rev
Log:
WW-3640 extend AbstractInterceptor

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
    struts/struts2/trunk/pom.xml
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java?rev=1130878&r1=1130877&r2=1130878&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java Fri Jun  3 00:17:27 2011
@@ -24,7 +24,7 @@ package org.apache.struts2.interceptor;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
-import com.opensymphony.xwork2.interceptor.Interceptor;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
 
 import java.util.Map;
 import java.util.Set;
@@ -48,7 +48,7 @@ import java.util.Iterator;
  * <p/>
  * <!-- END SNIPPET: extending -->
  */
-public class CheckboxInterceptor implements Interceptor {
+public class CheckboxInterceptor extends AbstractInterceptor {
 
     /** Auto-generated serialization id */
     private static final long serialVersionUID = -586878104807229585L;
@@ -57,12 +57,6 @@ public class CheckboxInterceptor impleme
 
     private static final Logger LOG = LoggerFactory.getLogger(CheckboxInterceptor.class);
 
-    public void destroy() {
-    }
-
-    public void init() {
-    }
-
     public String intercept(ActionInvocation ai) throws Exception {
         Map parameters = ai.getInvocationContext().getParameters();
         Map<String, String[]> newParams = new HashMap<String, String[]>();

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java?rev=1130878&r1=1130877&r2=1130878&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java Fri Jun  3 00:17:27 2011
@@ -31,7 +31,7 @@ import org.apache.struts2.dispatcher.Ser
 import com.opensymphony.xwork2.ActionContext;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.ValidationAware;
-import com.opensymphony.xwork2.interceptor.Interceptor;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 
@@ -145,7 +145,7 @@ import com.opensymphony.xwork2.util.logg
  *
  * @version $Date$ $Id$
  */
-public class MessageStoreInterceptor implements Interceptor {
+public class MessageStoreInterceptor extends AbstractInterceptor {
 
     private static final long serialVersionUID = 4491997514314242420L;
 
@@ -164,8 +164,6 @@ public class MessageStoreInterceptor imp
     public static final String actionErrorsSessionKey = "__MessageStoreInterceptor_ActionErrors_SessionKey";
     public static final String actionMessagesSessionKey = "__MessageStoreInterceptor_ActionMessages_SessionKey";
 
-
-
     public void setAllowRequestParameterSwitch(boolean allowRequestParameterSwitch) {
         this.allowRequestParameterSwitch = allowRequestParameterSwitch;
     }
@@ -173,7 +171,6 @@ public class MessageStoreInterceptor imp
         return this.allowRequestParameterSwitch;
     }
 
-
     public void setRequestParameterSwitch(String requestParameterSwitch) {
         this.requestParameterSwitch = requestParameterSwitch;
     }
@@ -181,8 +178,6 @@ public class MessageStoreInterceptor imp
         return this.requestParameterSwitch;
     }
 
-
-
     public void setOperationMode(String operationMode) {
         this.operationMode = operationMode;
     }
@@ -190,13 +185,6 @@ public class MessageStoreInterceptor imp
         return this.operationMode;
     }
 
-
-    public void destroy() {
-    }
-
-    public void init() {
-    }
-
     public String intercept(ActionInvocation invocation) throws Exception {
         if (LOG.isDebugEnabled()) {
             LOG.debug("entering MessageStoreInterceptor ...");

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java?rev=1130878&r1=1130877&r2=1130878&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java Fri Jun  3 00:17:27 2011
@@ -47,7 +47,7 @@ import org.apache.struts2.views.freemark
 import com.opensymphony.xwork2.ActionContext;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.interceptor.Interceptor;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
 import com.opensymphony.xwork2.interceptor.PreResultListener;
 import com.opensymphony.xwork2.util.ValueStack;
 import com.opensymphony.xwork2.util.logging.Logger;
@@ -89,7 +89,7 @@ import com.opensymphony.xwork2.util.refl
  * Result has a chance to execute.
  * <!-- END SNIPPET: remarks -->
  */
-public class DebuggingInterceptor implements Interceptor {
+public class DebuggingInterceptor extends AbstractInterceptor {
 
     private static final long serialVersionUID = -3097324155953078783L;
 
@@ -136,20 +136,6 @@ public class DebuggingInterceptor implem
         this.reflectionProvider = reflectionProvider;
     }
 
-    /**
-     * Unused.
-     */
-    public void init() {
-    }
-
-
-    /**
-     * Unused.
-     */
-    public void destroy() {
-    }
-
-
     /*
      * (non-Javadoc)
      *

Modified: struts/struts2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/pom.xml?rev=1130878&r1=1130877&r2=1130878&view=diff
==============================================================================
--- struts/struts2/trunk/pom.xml (original)
+++ struts/struts2/trunk/pom.xml Fri Jun  3 00:17:27 2011
@@ -88,6 +88,7 @@
         <struts2.springPlatformVersion>2.5.6</struts2.springPlatformVersion>
         <ognl.version>3.0.1</ognl.version>
         <asm.version>3.1</asm.version>
+        <tiles.version>2.0.6</tiles.version>
     </properties>
 
     <profiles>
@@ -459,12 +460,12 @@
             <dependency>
                 <groupId>org.apache.tiles</groupId>
                 <artifactId>tiles-core</artifactId>
-                <version>2.0.6</version>
+                <version>${tiles.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.tiles</groupId>
                 <artifactId>tiles-jsp</artifactId>
-                <version>2.0.6</version>
+                <version>${tiles.version}</version>
                 <scope>runtime</scope>
             </dependency>
 

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java?rev=1130878&r1=1130877&r2=1130878&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/AnnotationWorkflowInterceptor.java Fri Jun  3 00:17:27 2011
@@ -17,7 +17,7 @@ package com.opensymphony.xwork2.intercep
 
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.XWorkException;
-import com.opensymphony.xwork2.interceptor.Interceptor;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
 import com.opensymphony.xwork2.interceptor.PreResultListener;
 import com.opensymphony.xwork2.util.AnnotationUtils;
 
@@ -103,7 +103,7 @@ import java.util.List;
  * @author Rainer Hermanns
  * @author Dan Oxlade, dan d0t oxlade at gmail d0t c0m
  */
-public class AnnotationWorkflowInterceptor implements Interceptor, PreResultListener {
+public class AnnotationWorkflowInterceptor extends AbstractInterceptor implements PreResultListener {
 
     /**
      * Discovers annotated methods on the action and calls them according to the workflow
@@ -153,12 +153,6 @@ public class AnnotationWorkflowIntercept
         return invocationResult;
     }
 
-    public void destroy() {
-    }
-
-    public void init() {
-    }
-
     protected static int comparePriorities(int val1, int val2) {
         if (val2 < val1) {
             return -1;

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java?rev=1130878&r1=1130877&r2=1130878&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/WildcardUtil.java Fri Jun  3 00:17:27 2011
@@ -1,12 +1,12 @@
 /*
  * Copyright 2010 Yahoo, Inc.  All rights reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,7 +40,7 @@ public class WildcardUtil {
             }
             else if (c == '*')
             {
-            	i--;	// skip backslash, too
+                i--;	// skip backslash, too
             }
             else if (needsBackslashToBeLiteralInRegex(c))
             {