Don’t access optional that’s clearly not set.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 13 Jan 2015 20:03:46 +0000 (21:03 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 13 Jan 2015 20:03:46 +0000 (21:03 +0100)
src/main/java/net/pterodactylus/xdcc/core/Core.java

index c2eaae8..3b1e639 100644 (file)
@@ -631,7 +631,7 @@ public class Core extends AbstractExecutionThreadService {
 
                Optional<Channel> channel = getChannel(network.get(), channelNotJoined.channel());
                if (!channel.isPresent()) {
-                       eventBus.post(new GenericMessage(format("Could not join %s but didn’t try to join, either.", channel.get())));
+                       eventBus.post(new GenericMessage(format("Could not join %s but didn’t try to join, either.", channelNotJoined.channel())));
                        return;
                }