Prevent NullPointerException when checking fingerprint
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 19 Jul 2015 18:37:51 +0000 (20:37 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 19 Jul 2015 18:37:51 +0000 (20:37 +0200)
src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java

index 290fcbe..5c1c021 100644 (file)
@@ -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);
        }
 
        /**