From fa0781daff73c7d3b572da53e3b3a0acc5f7ec3b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 25 Sep 2021 18:32:40 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=94=A5=20Remove=20unnecessary=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 3 +-- src/main/java/net/pterodactylus/xdcc/data/Channel.java | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 649db75..8bc923f 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -22,7 +22,6 @@ import static net.pterodactylus.irc.event.ChannelNotJoined.Reason.banned; import static net.pterodactylus.irc.event.ChannelNotJoined.Reason.inviteOnly; import static net.pterodactylus.irc.event.ChannelNotJoined.Reason.registeredNicknamesOnly; import static net.pterodactylus.irc.util.MessageCleaner.getDefaultInstance; -import static net.pterodactylus.xdcc.data.Channel.TO_NETWORK; import static net.pterodactylus.xdcc.data.Download.FILTER_RUNNING; import java.io.File; @@ -186,7 +185,7 @@ public class Core extends AbstractExecutionThreadService { * @return All defined networks */ public Collection networks() { - return FluentIterable.from(channels).transform(TO_NETWORK).toSet(); + return FluentIterable.from(channels).transform(Channel::network).toSet(); } /** diff --git a/src/main/java/net/pterodactylus/xdcc/data/Channel.java b/src/main/java/net/pterodactylus/xdcc/data/Channel.java index f4c8d01..68e0cb6 100644 --- a/src/main/java/net/pterodactylus/xdcc/data/Channel.java +++ b/src/main/java/net/pterodactylus/xdcc/data/Channel.java @@ -28,14 +28,6 @@ import com.google.common.base.Function; */ public class Channel { - /** Function to convert a channel to its network. */ - public static final Function TO_NETWORK = new Function() { - @Override - public Network apply(Channel channel) { - return channel.network(); - } - }; - /** The network this channel belongs to. */ private final Network network; -- 2.7.4