From 7509c8704beecce72aaf771e056844bcda07ade6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 25 Sep 2021 17:57:11 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=8E=A8=20Use=20method=20reference=20instea?= =?utf8?q?d=20of=20anonymous=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/irc/DefaultConnection.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/net/pterodactylus/irc/DefaultConnection.java b/src/main/java/net/pterodactylus/irc/DefaultConnection.java index 79ab87b..39908ef 100644 --- a/src/main/java/net/pterodactylus/irc/DefaultConnection.java +++ b/src/main/java/net/pterodactylus/irc/DefaultConnection.java @@ -98,13 +98,7 @@ public class DefaultConnection extends AbstractExecutionThreadService implements private final int port; /** The nickname chooser. */ - private NicknameChooser nicknameChooser = new NicknameChooser() { - - @Override - public String getNickname() { - return RandomNickname.get(); - } - }; + private NicknameChooser nicknameChooser = RandomNickname::get; /** The nickname. */ private String nickname = null; -- 2.7.4