Author: schultz
Date: Tue Apr 24 12:50:44 2018
New Revision: 1829990

URL: http://svn.apache.org/viewvc?rev=1829990&view=rev
Log:
Performance improvement: int-compare is usually cheaper than Array-comparison, 
so compare the int fields first to fail more quickly if possible.

Modified:
    tomcat/trunk/java/org/apache/el/parser/SimpleNode.java

Modified: tomcat/trunk/java/org/apache/el/parser/SimpleNode.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/SimpleNode.java?rev=1829990&r1=1829989&r2=1829990&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/parser/SimpleNode.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/SimpleNode.java Tue Apr 24 12:50:44 
2018
@@ -179,10 +179,10 @@ public abstract class SimpleNode extends
             return false;
         }
         SimpleNode other = (SimpleNode) obj;
-        if (!Arrays.equals(children, other.children)) {
+        if (id != other.id) {
             return false;
         }
-        if (id != other.id) {
+        if (!Arrays.equals(children, other.children)) {
             return false;
         }
         if (image == null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to