X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=5ce01fe3df96b3f766c572746e17e6e4009cfa2c;hp=2a1ef8eeb557927c2cb1f8f340d78d93106bb3e2;hb=d678616d36fce087fe89cdbc27f0169e7a612790;hpb=da609f721e54691f27113e877a19637bd332abc3 diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 2a1ef8e..5ce01fe 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -558,25 +558,15 @@ public class Core extends AbstractService implements SoneProvider, PostProvider } /** - * Returns the reply with the given ID. If there is no reply with the given - * ID yet, a new one is created, unless {@code create} is false in which - * case {@code null} is returned. + * Returns the reply with the given ID. * * @param replyId * The ID of the reply to get - * @param create - * {@code true} to always return a {@link Reply}, {@code false} - * to return {@code null} if no reply can be found * @return The reply, or {@code null} if there is no such reply */ - public PostReply getPostReply(String replyId, boolean create) { + public PostReply getPostReply(String replyId) { synchronized (replies) { - PostReply reply = replies.get(replyId); - if (create && (reply == null)) { - reply = new PostReplyImpl(replyId); - replies.put(replyId, reply); - } - return reply; + return replies.get(replyId); } }