From: David ‘Bombe’ Roden Date: Thu, 4 Nov 2010 05:56:50 +0000 (+0100) Subject: Always return a Reply. X-Git-Tag: 0.2-RC1~54 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8469b16d207317c53a88de915e1ee6a8a648a114;p=Sone.git Always return a Reply. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 28ef2d7..adf580b 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -310,7 +310,12 @@ public class Core implements IdentityListener { */ public Reply getReply(String replyId) { synchronized (replies) { - return replies.get(replyId); + Reply reply = replies.get(replyId); + if (reply == null) { + reply = new Reply(replyId); + replies.put(replyId, reply); + } + return reply; } }