commit | 73019651dc028e6c475ebbdc7274d205d58f5eae | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Mon Mar 24 11:12:44 2014 -0700 |
committer | Ray Milkey <ray@onlab.us> | Mon Mar 24 11:16:41 2014 -0700 |
tree | 9f5e7b070d861a6a0795a57217be7d64ce7af1d8 | |
parent | 5fe718821b42f52ac2253090f34d35887cd12bbe [diff] |
Fix erroneous use of '==' operator to compare two Class objects. This error was found by PMD, two pointers were being compared for equality, which is not always correct. The '==' operators were replaced with calls o ".equals()" Change-Id: I33ee78f9478e6f7c81716417bc8d4f942839fe8d
diff --git a/src/main/java/net/onrc/onos/datagrid/HazelcastEventChannel.java b/src/main/java/net/onrc/onos/datagrid/HazelcastEventChannel.java index cace751..bef0243 100644 --- a/src/main/java/net/onrc/onos/datagrid/HazelcastEventChannel.java +++ b/src/main/java/net/onrc/onos/datagrid/HazelcastEventChannel.java
@@ -69,7 +69,7 @@ @Override public boolean verifyKeyValueTypes(Class typeKToVerify, Class typeVToVerify) { - return (typeK == typeKToVerify) && (typeV == typeVToVerify); + return (typeK.equals(typeKToVerify)) && (typeV.equals(typeVToVerify)); } /**