X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FPostVisibilityFilter.java;h=d29d537ffaafe53f856cbc54e22a64ff69cf226a;hb=9b102d5ff09775e3867ad8709f22baf0ad608d30;hp=edcd148d1d8de973fe4911bd0cce842ea6e99923;hpb=3da1daa6488c642430858a4baacc0aa986a6ebc1;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/notify/PostVisibilityFilter.java b/src/main/java/net/pterodactylus/sone/notify/PostVisibilityFilter.java
index edcd148..d29d537 100644
--- a/src/main/java/net/pterodactylus/sone/notify/PostVisibilityFilter.java
+++ b/src/main/java/net/pterodactylus/sone/notify/PostVisibilityFilter.java
@@ -16,8 +16,6 @@ import com.google.common.base.Predicate;
/**
* Filters {@link Notification}s involving {@link Post}s.
- *
- * @author David âBombeâ Roden
*/
@Singleton
public class PostVisibilityFilter {
@@ -87,10 +85,9 @@ public class PostVisibilityFilter {
@Nonnull
public Predicate isVisible(@Nullable final Sone currentSone) {
return new Predicate() {
- @Nonnull
@Override
public boolean apply(@Nullable Post post) {
- return isPostVisible(currentSone, post);
+ return (post != null) && isPostVisible(currentSone, post);
}
};
}