aboutsummaryrefslogtreecommitdiffstats
path: root/shared/src
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-18 16:05:29 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-19 15:06:34 +0300
commit62d49f3c3af00e7f9a0b324e58bef560b6f9dca0 (patch)
tree2343c832c926d0c8a2b31cb81cfd44c4db7fe40c /shared/src
parentd2a2c61b81e9441e8c3cb36336cca4bbb6c37fd4 (diff)
downloadvaadin-framework-62d49f3c3af00e7f9a0b324e58bef560b6f9dca0.tar.gz
vaadin-framework-62d49f3c3af00e7f9a0b324e58bef560b6f9dca0.zip
Implement hashCode() when implementing equals()
Diffstat (limited to 'shared/src')
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java b/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
index c60e711106..9542a04e84 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
@@ -108,8 +108,17 @@ public class MethodInvocation implements Serializable {
if (!SharedUtil.equals(getParameters(), other.getParameters())) {
return false;
}
-
return true;
+ }
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((connectorId == null) ? 0 : connectorId.hashCode());
+ result = prime * result + ((interfaceName == null) ? 0 : interfaceName.hashCode());
+ result = prime * result + ((methodName == null) ? 0 : methodName.hashCode());
+ result = prime * result + Arrays.hashCode(parameters);
+ return result;
}
}