From: David ‘Bombe’ Roden Date: Sat, 25 Sep 2021 15:57:11 +0000 (+0200) Subject: 🎨 Use method reference instead of anonymous class X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7509c8704beecce72aaf771e056844bcda07ade6;p=xudocci.git 🎨 Use method reference instead of anonymous class --- 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;