aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-02-15 23:29:36 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-02-15 23:29:36 -0800
commitb85d10bcc7baa7b7efafa82933a5abaaa8db2c92 (patch)
treedb10033eebe5b9b849df14490a7d502a55da8419
parent2e769ee25bf7d134e4625cc5814661588adf7794 (diff)
downloadtrackermap-server-b85d10bcc7baa7b7efafa82933a5abaaa8db2c92.tar.gz
trackermap-server-b85d10bcc7baa7b7efafa82933a5abaaa8db2c92.tar.bz2
trackermap-server-b85d10bcc7baa7b7efafa82933a5abaaa8db2c92.zip
Fix style issues
-rw-r--r--src/main/java/org/traccar/model/Pair.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/org/traccar/model/Pair.java b/src/main/java/org/traccar/model/Pair.java
index fa856db96..b679de57b 100644
--- a/src/main/java/org/traccar/model/Pair.java
+++ b/src/main/java/org/traccar/model/Pair.java
@@ -23,22 +23,21 @@ public class Pair<K, V> {
@SuppressWarnings("rawtypes")
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
Pair pair = (Pair) o;
- if (!Objects.equals(first, pair.first)) return false;
- if (!Objects.equals(second, pair.second)) return false;
-
- return true;
+ return Objects.equals(first, pair.first) && Objects.equals(second, pair.second);
}
@Override
public int hashCode() {
- int result = first != null ? first.hashCode() : 0;
- result = 31 * result + (second != null ? second.hashCode() : 0);
- return result;
+ return Objects.hash(first, second);
}
}