Author: schultz
Date: Tue Apr 24 12:51:39 2018
New Revision: 1829991
URL: http://svn.apache.org/viewvc?rev=1829991&view=rev
Log:
Performance improvement: String-compare is usually cheaper than
Array-comparison, so compare the String 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=1829991&r1=1829990&r2=1829991&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:51:39
2018
@@ -182,9 +182,6 @@ public abstract class SimpleNode extends
if (id != other.id) {
return false;
}
- if (!Arrays.equals(children, other.children)) {
- return false;
- }
if (image == null) {
if (other.image != null) {
return false;
@@ -192,6 +189,9 @@ public abstract class SimpleNode extends
} else if (!image.equals(other.image)) {
return false;
}
+ if (!Arrays.equals(children, other.children)) {
+ return false;
+ }
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]