projects
/
simple-mapper
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87dca7f
)
Cleared some "Possible Null-Pointer Dereferencing"-warnings
author
Kai Moritz
<kai@juplo.de>
Wed, 22 Jun 2016 08:40:40 +0000
(10:40 +0200)
committer
Kai Moritz
<kai@juplo.de>
Wed, 22 Jun 2016 08:40:40 +0000
(10:40 +0200)
src/main/java/de/juplo/jackson/SimpleMapper.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/jackson/SimpleMapper.java
b/src/main/java/de/juplo/jackson/SimpleMapper.java
index
914fd5f
..
d7f108c
100644
(file)
--- 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
}