Log the content of the protocol version optionals.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 21 Oct 2013 04:36:10 +0000 (06:36 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:32 +0000 (22:25 +0100)
src/main/java/net/pterodactylus/sone/core/SoneParser.java

index 17d741e..fe2e0a9 100644 (file)
@@ -100,11 +100,11 @@ public class SoneParser {
                Optional<Integer> protocolVersion = parseProtocolVersion(soneXml.get());
                if (protocolVersion.isPresent()) {
                        if (protocolVersion.get() < 0) {
-                               logger.log(Level.WARNING, String.format("Invalid protocol version: %d! Not parsing Sone.", protocolVersion));
+                               logger.log(Level.WARNING, String.format("Invalid protocol version: %d! Not parsing Sone.", protocolVersion.get()));
                                return null;
                        }
                        if (protocolVersion.get() > MAX_PROTOCOL_VERSION) {
-                               logger.log(Level.WARNING, String.format("Unknown protocol version: %d! Not parsing Sone.", protocolVersion));
+                               logger.log(Level.WARNING, String.format("Unknown protocol version: %d! Not parsing Sone.", protocolVersion.get()));
                                return null;
                        }
                }