Author: mcucchiara
Date: Thu Nov  3 08:57:06 2011
New Revision: 1197002

URL: http://svn.apache.org/viewvc?rev=1197002&view=rev
Log:
OGNL-37 - Modified equals() implementation to take account of super class 
fields.

Modified:
    
commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java

Modified: 
commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java
URL: 
http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java?rev=1197002&r1=1197001&r2=1197002&view=diff
==============================================================================
--- 
commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java
 (original)
+++ 
commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java
 Thu Nov  3 08:57:06 2011
@@ -46,20 +46,24 @@ public class DeclaredMethodCacheEntry
     }
 
     @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
+    public boolean equals(Object o) {
+        if (this == o)
         {
             return true;
         }
-        if ( !( o instanceof DeclaredMethodCacheEntry ) )
+        if (!(o instanceof DeclaredMethodCacheEntry))
+        {
+            return false;
+        }
+        if (!super.equals(o))
         {
             return false;
         }
 
         DeclaredMethodCacheEntry that = (DeclaredMethodCacheEntry) o;
 
-        return targetClass == that.targetClass;
+        return type == that.type;
+
     }
 
     @Override


Reply via email to