Skip to content

Commit

Permalink
Clarifications on nullness
Browse files Browse the repository at this point in the history
  • Loading branch information
mbax committed Jul 1, 2015
1 parent 012b5ef commit 20f1f3d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class IRCChannel extends IRCActor {
private volatile boolean fullListReceived;
private long lastWho = System.currentTimeMillis();
private String topic;
@Nullable
private Actor topicSetter;
private long topicTime;
private volatile boolean tracked;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/kitteh/irc/client/library/Listener.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.kitteh.irc.client.library.util.QueueProcessingThread;

import javax.annotation.Nullable;
import java.util.Queue;
import java.util.function.Consumer;

Expand Down Expand Up @@ -59,6 +60,7 @@ protected void cleanup(Queue<Type> remainingQueue) {
}

private final String clientName;
@Nullable
private ListenerThread thread;

Listener(String clientName, Consumer<Type> consumer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ private void shutdown(@Nullable String message, boolean reconnect) {
}
}

@Nullable
private static Bootstrap bootstrap;
@Nullable
private static EventLoopGroup eventLoopGroup;
private static final Set<ClientConnection> connections = new HashSet<>();

Expand All @@ -237,7 +239,9 @@ private NettyManager() {
private static synchronized void removeClientConnection(@Nonnull ClientConnection connection, boolean reconnecting) {
connections.remove(connection);
if (!reconnecting && connections.isEmpty()) {
eventLoopGroup.shutdownGracefully();
if (eventLoopGroup != null) {
eventLoopGroup.shutdownGracefully();
}
eventLoopGroup = null;
bootstrap = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public abstract class ActorChannelEventBase<A extends Actor> extends ActorEventB
private final Channel channel;

/**
* Constructs thet event.
* Constructs the event.
*
* @param client the client
* @param actor the actor
Expand Down

0 comments on commit 20f1f3d

Please sign in to comment.