From: Kai Moritz Date: Wed, 22 Jun 2016 08:40:40 +0000 (+0200) Subject: Cleared some "Possible Null-Pointer Dereferencing"-warnings X-Git-Tag: simple-mapper-1.0.0~35 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=f6a000c1d8ae0a652ff1612a373a0a119de5855c;p=simple-mapper Cleared some "Possible Null-Pointer Dereferencing"-warnings --- diff --git a/src/main/java/de/juplo/jackson/SimpleMapper.java b/src/main/java/de/juplo/jackson/SimpleMapper.java index 914fd5f..d7f108c 100644 --- a/src/main/java/de/juplo/jackson/SimpleMapper.java +++ b/src/main/java/de/juplo/jackson/SimpleMapper.java @@ -332,7 +332,10 @@ public abstract class SimpleMapper { JsonToken token = parser.getCurrentToken(); if (token == null) + { fail(parser, "unexpected EOF"); + return null; // << Will never be reached, because fail always throws an exception + } switch (token) { @@ -346,7 +349,7 @@ public abstract class SimpleMapper case VALUE_NULL: return null; } - fail(parser, "unexpected token " + token.toString()); + fail(parser, "unexpected token " + token); return null; // << Will never be reached, because fail always throws an exception }