From b42f9164a0f77cf186e1a54c9d13c259fe84bdd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 21 Jul 2015 22:35:15 +0200 Subject: [PATCH] Prevent NullPointerExceptions on new Sones --- .../java/net/pterodactylus/sone/core/SoneModificationDetector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.7.4