From: David ‘Bombe’ Roden Date: Sun, 19 Jul 2015 18:37:51 +0000 (+0200) Subject: Prevent NullPointerException when checking fingerprint X-Git-Tag: 0.9.2^2~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1a6760ab3b643704667659b6a2f85db29dd1bc17;p=Sone.git Prevent NullPointerException when checking fingerprint --- 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); } /**