From 8469b16d207317c53a88de915e1ee6a8a648a114 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 4 Nov 2010 06:56:50 +0100 Subject: [PATCH] Always return a Reply. --- src/main/java/net/pterodactylus/sone/core/Core.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } } -- 2.7.4