[infinispan-commits] Infinispan SVN: r769 - trunk/core/src/main/java/org/infinispan/commands/write.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Thu Sep 3 05:28:00 EDT 2009


Author: mircea.markus
Date: 2009-09-03 05:28:00 -0400 (Thu, 03 Sep 2009)
New Revision: 769

Modified:
   trunk/core/src/main/java/org/infinispan/commands/write/InvalidateL1Command.java
Log:
findbugs:
 Class doesn't override equals in superclass
This class extends a class that defines an equals method and adds fields, but doesn't define an equals method itself. Thus, equality on instances of this class will ignore the identity of the subclass and the added fields. Be sure this is what is intended, and that you don't need to override the equals method. Even if you don't need to override the equals method, consider overriding it anyway to document the fact that the equals method for the subclass just return the result of invoking super.equals(o).

Modified: trunk/core/src/main/java/org/infinispan/commands/write/InvalidateL1Command.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/commands/write/InvalidateL1Command.java	2009-09-03 09:26:53 UTC (rev 768)
+++ trunk/core/src/main/java/org/infinispan/commands/write/InvalidateL1Command.java	2009-09-03 09:28:00 UTC (rev 769)
@@ -43,4 +43,9 @@
       }
       return null;
    }
+
+   @Override
+   public boolean equals(Object o) {
+      return this == o || o instanceof InvalidateL1Command && super.equals(o);
+   }
 }



More information about the infinispan-commits mailing list