You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/01/16 14:54:04 UTC
svn commit: r899949 - in /tomcat/trunk/java/org/apache/el:
ValueExpressionImpl.java parser/SimpleNode.java
Author: markt
Date: Sat Jan 16 13:54:04 2010
New Revision: 899949
URL: http://svn.apache.org/viewvc?rev=899949&view=rev
Log:
TCK failure: Can't use the string representation to test for equality as whitespace must be ignored. Use the parsed nodes instead.
Modified:
tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java
tomcat/trunk/java/org/apache/el/parser/SimpleNode.java
Modified: tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java?rev=899949&r1=899948&r2=899949&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java (original)
+++ tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java Sat Jan 16 13:54:04 2010
@@ -203,7 +203,7 @@
*/
@Override
public int hashCode() {
- return this.expr.hashCode();
+ return this.getNode().hashCode();
}
/*
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=899949&r1=899948&r2=899949&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/parser/SimpleNode.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/SimpleNode.java Sat Jan 16 13:54:04 2010
@@ -18,6 +18,8 @@
package org.apache.el.parser;
+import java.util.Arrays;
+
import javax.el.ELException;
import javax.el.MethodInfo;
import javax.el.PropertyNotWritableException;
@@ -164,6 +166,45 @@
throw new UnsupportedOperationException();
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + Arrays.hashCode(children);
+ result = prime * result + id;
+ result = prime * result + ((image == null) ? 0 : image.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof SimpleNode)) {
+ return false;
+ }
+ SimpleNode other = (SimpleNode) obj;
+ if (!Arrays.equals(children, other.children)) {
+ return false;
+ }
+ if (id != other.id) {
+ return false;
+ }
+ if (image == null) {
+ if (other.image != null) {
+ return false;
+ }
+ } else if (!image.equals(other.image)) {
+ return false;
+ }
+ return true;
+ }
+
/**
* @since EL 2.2
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r899949 - in /tomcat/trunk/java/org/apache/el: ValueExpressionImpl.java
parser/SimpleNode.java
Posted by Mark Thomas <ma...@apache.org>.
On 16/01/2010 13:54, markt@apache.org wrote:
> Author: markt
> Date: Sat Jan 16 13:54:04 2010
> New Revision: 899949
>
> URL: http://svn.apache.org/viewvc?rev=899949&view=rev
> Log:
> TCK failure:...
And with that commit the EL 2.2 TCK passes as well.
"Just" the remainder of the Servlet 3.0 changes to implement and the
Servlet 3.0 TCK to pass :)
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org