From 1a6760ab3b643704667659b6a2f85db29dd1bc17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 19 Jul 2015 20:37:51 +0200 Subject: [PATCH] Prevent NullPointerException when checking fingerprint --- .../java/net/pterodactylus/sone/core/SoneModificationDetector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java b/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java index 290fcbe..5c1c021 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java @@ -10,6 +10,7 @@ import java.util.concurrent.atomic.AtomicInteger; import net.pterodactylus.sone.data.Sone; import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Objects; import com.google.common.base.Optional; import com.google.common.base.Ticker; @@ -76,7 +77,7 @@ class SoneModificationDetector { } public boolean isModified() { - return !lockableFingerprintProvider.getFingerprint().equals(originalFingerprint); + return !Objects.equal(lockableFingerprintProvider.getFingerprint(), originalFingerprint); } /** -- 2.7.4