From: David ‘Bombe’ Roden Date: Tue, 21 Jul 2015 20:35:15 +0000 (+0200) Subject: Prevent NullPointerExceptions on new Sones X-Git-Tag: 0.9.3^2~10 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b42f9164a0f77cf186e1a54c9d13c259fe84bdd4;p=Sone.git Prevent NullPointerExceptions on new Sones --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java b/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java index 5c1c021..71c28bb 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneModificationDetector.java @@ -49,12 +49,12 @@ class SoneModificationDetector { return false; } String fingerprint = lockableFingerprintProvider.getFingerprint(); - if (originalFingerprint.equals(fingerprint)) { + if (fingerprint.equals(originalFingerprint)) { lastModificationTime = absent(); lastFingerprint = fingerprint; return false; } - if (!lastFingerprint.equals(fingerprint)) { + if (!Objects.equal(lastFingerprint, fingerprint)) { lastModificationTime = of(ticker.read()); lastFingerprint = fingerprint; return false;