Prevent potential NullPointerException
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 20 Jul 2015 16:47:40 +0000 (18:47 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 20 Jul 2015 16:47:40 +0000 (18:47 +0200)
src/main/java/net/pterodactylus/sone/freenet/wot/IdentityChangeDetector.java

index a8cb62b..2fe10df 100644 (file)
@@ -142,7 +142,7 @@ public class IdentityChangeDetector {
                return new Predicate<Identity>() {
                        @Override
                        public boolean apply(Identity identity) {
-                               return identities.containsKey(identity.getId());
+                               return (identity != null) && identities.containsKey(identity.getId());
                        }
                };
        }