X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;h=e9b7a1db99f43f2f03c8c8349fa22c1244b54c25;hb=1deeb8285b1347baa98994b10322b548fd71a449;hp=a686023fad004e90f45c8e0d52d21a1ba0585a37;hpb=6d8f11098552fcb40a87d3e35690b3ba760fb947;p=Sone.git 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()); } };