polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [1/7] zest-qi4j git commit: NamedAssociations missing in equals() and hashCode()
Date Fri, 17 Jul 2015 14:06:26 GMT
Repository: zest-qi4j
Updated Branches:
  refs/heads/develop 858f5baeb -> a0c74a7ba


NamedAssociations missing in equals() and hashCode()


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/d2fbb10c
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/d2fbb10c
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/d2fbb10c

Branch: refs/heads/develop
Commit: d2fbb10c247193410717e891951c41297745553e
Parents: 44f6157
Author: Niclas Hedhman <hedmann@betfair.com>
Authored: Fri Jul 17 08:55:48 2015 +0300
Committer: Niclas Hedhman <hedmann@betfair.com>
Committed: Fri Jul 17 08:55:48 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/qi4j/runtime/value/ValueStateInstance.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/d2fbb10c/core/runtime/src/main/java/org/qi4j/runtime/value/ValueStateInstance.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/value/ValueStateInstance.java b/core/runtime/src/main/java/org/qi4j/runtime/value/ValueStateInstance.java
index ad5b5f2..3d41470 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/value/ValueStateInstance.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/value/ValueStateInstance.java
@@ -215,7 +215,11 @@ public final class ValueStateInstance
         {
             return false;
         }
-        return manyAssociations.equals( state.manyAssociations );
+        if( !manyAssociations.equals( state.manyAssociations ) )
+        {
+            return false;
+        }
+        return namedAssociations.equals( state.namedAssociations );
     }
 
     @Override
@@ -224,6 +228,7 @@ public final class ValueStateInstance
         int result = properties.hashCode();
         result = 31 * result + associations.hashCode();
         result = 31 * result + manyAssociations.hashCode();
+        result = 31 * result + namedAssociations.hashCode();
         return result;
     }
 }


Mime
View raw message