aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java')
-rw-r--r--third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java
index 200f96dfa9..f898e3c9b4 100644
--- a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java
+++ b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/util/HashCodeUtils.java
@@ -4,7 +4,6 @@ package org.checkerframework.dataflow.util;
* Utility class to implement the {@code hashCode} method.
*
* @author Stefan Heule
- *
*/
public class HashCodeUtils {
@@ -47,8 +46,9 @@ public class HashCodeUtils {
/** Add an object to a given hash. */
public static int hash(int hash, Object item) {
- if (item == null)
+ if (item == null) {
return hash * prime;
+ }
return hash * prime + item.hashCode();
}
@@ -85,8 +85,9 @@ public class HashCodeUtils {
/** Hash an object. */
public static int hash(Object item) {
- if (item == null)
+ if (item == null) {
return 0;
+ }
return item.hashCode();
}