From: David ‘Bombe’ Roden Date: Mon, 2 Oct 2017 13:47:13 +0000 (+0200) Subject: Don’t return Sone from removeLiked{Post,Reply}Id() X-Git-Tag: 0.9.7^2~37 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c56cbae5dd54a70fcdaea024d606dee69525c7e9;p=Sone.git Don’t return Sone from removeLiked{Post,Reply}Id() --- 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; } /**