changeset 1346:bd5ddefd7e9f

hashCode and equal in Category ignore indexKeys Reviewed-by: jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-November/008828.html
author Omair Majid <omajid@redhat.com>
date Tue, 19 Nov 2013 13:23:40 -0500
parents 37efb2ef077a
children 486682454795
files storage/core/src/main/java/com/redhat/thermostat/storage/core/Category.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/Category.java	Mon Nov 18 08:24:25 2013 -0700
+++ b/storage/core/src/main/java/com/redhat/thermostat/storage/core/Category.java	Tue Nov 19 13:23:40 2013 -0500
@@ -237,6 +237,8 @@
          * created. This occurs either via JSON deserialization, the only public
          * constructor or AdaptedCategory.
          */
+
+        // ignore indexed keys intentionally
         return Objects.hash(name, keys, getDataClass());
     }
 
@@ -246,6 +248,7 @@
             return false;
         }
         Category<?> other = (Category<?>) o;
+        // ignore indexed keys intentionally
         return Objects.equals(name, other.name) &&
                 Objects.equals(keys, other.keys) &&
                 Objects.equals(getDataClass(), other.getDataClass());