You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ba...@apache.org on 2008/05/10 14:21:35 UTC

svn commit: r655064 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java

Author: barrettj
Date: Sat May 10 05:21:34 2008
New Revision: 655064

URL: http://svn.apache.org/viewvc?rev=655064&view=rev
Log:
Performance improvement for Handler.InvocationResponse submitted by
David Strite: make the class and some attributes final, check for
reference equality first in equals.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java?rev=655064&r1=655063&r2=655064&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java Sat May 10 05:21:34 2008
@@ -110,16 +110,16 @@
      * runtime.  The returned instruction will determine the next step in
      * the processing.
      */
-    public class InvocationResponse {
-        public static InvocationResponse CONTINUE =
+    public final class InvocationResponse {
+        public static final InvocationResponse CONTINUE =
                 new InvocationResponse(0, "InvocationResponse.CONTINUE");
-        public static InvocationResponse SUSPEND =
+        public static final InvocationResponse SUSPEND =
                 new InvocationResponse(1, "InvocationResponse.SUSPEND");
-        public static InvocationResponse ABORT =
+        public static final InvocationResponse ABORT =
                 new InvocationResponse(2, "InvocationResponse.ABORT");
 
-        private int instructionID;
-        private String description;
+        private final int instructionID;
+        private final String description;
 
         private InvocationResponse(int instructionID, String description) {
             this.instructionID = instructionID;
@@ -131,6 +131,9 @@
         }
 
         public boolean equals(Object obj) {
+        	if(this==obj) {
+        		return true;
+        	}
             if (!(obj instanceof InvocationResponse)) {
                 return false;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org