Don’t initialize peer with null
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 12 Jul 2015 10:53:09 +0000 (12:53 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 12 Jul 2015 10:53:09 +0000 (12:53 +0200)
src/main/java/net/pterodactylus/fcp/quelaton/AddPeerCommandImpl.java

index e1f0d5b..a54f166 100644 (file)
@@ -59,7 +59,7 @@ public class AddPeerCommandImpl implements AddPeerCommand {
        }
 
        private Optional<Peer> executeSequence() throws IOException, ExecutionException, InterruptedException {
-               AddPeer addPeer = null;
+               AddPeer addPeer;
                if (file.get() != null) {
                        addPeer = new AddPeer(new RandomIdentifierGenerator().generate(), file.get().getPath());
                } else if (url.get() != null) {