From c56cbae5dd54a70fcdaea024d606dee69525c7e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 2 Oct 2017 15:47:13 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20return=20Sone=20from=20removeLik?= =?utf8?q?ed{Post,Reply}Id()?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/data/Sone.java | 8 ++------ src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java | 6 ++---- src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java | 10 ++-------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 258fb4c..b761c7b 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -443,10 +443,8 @@ public interface Sone extends Identified, Fingerprintable, Comparable { * * @param postId * The ID of the post - * @return This Sone (for method chaining) */ - @Nonnull - Sone removeLikedPostId(@Nonnull String postId); + void removeLikedPostId(@Nonnull String postId); /** * Returns the IDs of all liked replies. @@ -491,10 +489,8 @@ public interface Sone extends Identified, Fingerprintable, Comparable { * * @param replyId * The ID of the reply - * @return This Sone (for method chaining) */ - @Nonnull - Sone removeLikedReplyId(@Nonnull String replyId); + void removeLikedReplyId(@Nonnull String replyId); /** * Returns the root album that contains all visible albums of this Sone. diff --git a/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java b/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java index e9a0c57..79766b5 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java @@ -184,8 +184,7 @@ public class IdOnlySone implements Sone { } @Override - public Sone removeLikedPostId(String postId) { - return this; + public void removeLikedPostId(String postId) { } @Override @@ -209,8 +208,7 @@ public class IdOnlySone implements Sone { } @Override - public Sone removeLikedReplyId(String replyId) { - return this; + public void removeLikedReplyId(String replyId) { } @Override diff --git a/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java b/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java index 439f4c9..0494607 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java @@ -533,12 +533,9 @@ public class SoneImpl implements Sone { * * @param postId * The ID of the post - * @return This Sone (for method chaining) */ - @Nonnull - public Sone removeLikedPostId(@Nonnull String postId) { + public void removeLikedPostId(@Nonnull String postId) { likedPostIds.remove(postId); - return this; } /** @@ -595,12 +592,9 @@ public class SoneImpl implements Sone { * * @param replyId * The ID of the reply - * @return This Sone (for method chaining) */ - @Nonnull - public Sone removeLikedReplyId(@Nonnull String replyId) { + public void removeLikedReplyId(@Nonnull String replyId) { likedReplyIds.remove(replyId); - return this; } /** -- 2.7.4