From: David ‘Bombe’ Roden Date: Sat, 25 Sep 2021 16:32:40 +0000 (+0200) Subject: 🔥 Remove unnecessary function X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fa0781daff73c7d3b572da53e3b3a0acc5f7ec3b;p=xudocci.git 🔥 Remove unnecessary function --- 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;