55import fr .rakambda .channelpointsminer .miner .api .passport .TwitchLogin ;
66import lombok .RequiredArgsConstructor ;
77import lombok .extern .log4j .Log4j2 ;
8- import org .jetbrains .annotations .NotNull ;
9- import org .jetbrains .annotations .Nullable ;
8+ import org .jspecify .annotations .NonNull ;
9+ import org .jspecify .annotations .Nullable ;
1010import org .kitteh .irc .client .library .Client ;
1111import org .kitteh .irc .client .library .defaults .element .messagetag .DefaultMessageTagLabel ;
1212import java .util .Collection ;
@@ -22,7 +22,7 @@ public class TwitchIrcChatClient implements ITwitchChatClient{
2222 private static final String TAGS_CAPABILITY = "twitch.tv/tags" ;
2323 private static final String EMOTE_SETS_TAG_NAME = "emote-sets" ;
2424
25- @ NotNull
25+ @ NonNull
2626 private final TwitchLogin twitchLogin ;
2727 private final boolean listenMessages ;
2828 private final Collection <ITwitchChatMessageListener > chatMessageListeners = new LinkedList <>();
@@ -33,7 +33,7 @@ public class TwitchIrcChatClient implements ITwitchChatClient{
3333 private TwitchIrcMessageHandler ircMessageHandler ;
3434
3535 @ Override
36- public void join (@ NotNull String channel ){
36+ public void join (@ NonNull String channel ){
3737 var client = getIrcClient ();
3838 var ircChannelName = "#%s" .formatted (channel .toLowerCase (Locale .ROOT ));
3939 if (client .getChannel (ircChannelName ).isPresent ()){
@@ -50,13 +50,13 @@ public void joinPending(){
5050 }
5151
5252 @ Override
53- public void addChatMessageListener (@ NotNull ITwitchChatMessageListener listener ){
53+ public void addChatMessageListener (@ NonNull ITwitchChatMessageListener listener ){
5454 chatMessageListeners .add (listener );
5555 Optional .ofNullable (ircMessageHandler ).ifPresent (i -> i .addListener (listener ));
5656 }
5757
5858 @ Override
59- public void leave (@ NotNull String channel ){
59+ public void leave (@ NonNull String channel ){
6060 if (Objects .isNull (ircClient )){
6161 log .debug ("Didn't leave irc channel #{} as no connection has been made" , channel );
6262 return ;
@@ -81,7 +81,7 @@ public void close(){
8181 Optional .ofNullable (ircClient ).ifPresent (Client ::shutdown );
8282 }
8383
84- @ NotNull
84+ @ NonNull
8585 private synchronized Client getIrcClient (){
8686 if (Objects .isNull (ircClient )){
8787 log .info ("Creating new Twitch IRC client" );
0 commit comments