Return absent() instead of null.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 24 Oct 2013 19:59:04 +0000 (21:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:35 +0000 (22:25 +0100)
src/main/java/net/pterodactylus/sone/core/SoneParser.java

index b2d82be..3158a0b 100644 (file)
@@ -339,7 +339,7 @@ public class SoneParser {
                String clientVersion = clientXml.getValue("version", null);
                if ((clientName == null) || (clientVersion == null)) {
                        logger.log(Level.WARNING, String.format("Download Sone %s with client XML but missing name or version!", sone));
-                       return null;
+                       return absent();
                }
                return of(new Client(clientName, clientVersion));
        }