X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;h=e9b7a1db99f43f2f03c8c8349fa22c1244b54c25;hp=a686023fad004e90f45c8e0d52d21a1ba0585a37;hb=0e8f7804ce344bdd69f5ecc7febe25a60a53561d;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90 diff --git a/src/main/java/net/pterodactylus/sone/data/Reply.java b/src/main/java/net/pterodactylus/sone/data/Reply.java index a686023..e9b7a1d 100644 --- a/src/main/java/net/pterodactylus/sone/data/Reply.java +++ b/src/main/java/net/pterodactylus/sone/data/Reply.java @@ -28,7 +28,7 @@ import com.google.common.base.Predicate; * The type of the reply * @author David ‘Bombe’ Roden */ -public interface Reply> { +public interface Reply> extends Identified { /** Comparator that sorts replies ascending by time. */ public static final Comparator> TIME_COMPARATOR = new Comparator>() { @@ -51,7 +51,7 @@ public interface Reply> { */ @Override public boolean apply(Reply reply) { - return reply.getTime() <= System.currentTimeMillis(); + return (reply != null) && (reply.getTime() <= System.currentTimeMillis()); } };