Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 13, 2020
1 parent 4b0d5bc commit 359ad71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ public Byte deserialize(JsonParser p, DeserializationContext ctxt) throws IOExce
if (p.hasToken(JsonToken.VALUE_NUMBER_INT)) {
return p.getByteValue();
}
// if (_primitive) {
// return _parseBytePrimitive(ctxt, p, _valueClass);
// }
if (_primitive) {
return _parseBytePrimitive(ctxt, p, _valueClass);
}
return _parseByte(ctxt, p, _valueClass);
}
}
Expand All @@ -294,9 +294,9 @@ public Short deserialize(JsonParser p, DeserializationContext ctxt)
if (p.hasToken(JsonToken.VALUE_NUMBER_INT)) {
return p.getShortValue();
}
// if (_primitive) {
// return _parseShortPrimitive(ctxt, p, _valueClass);
// }
if (_primitive) {
return _parseShortPrimitive(ctxt, p, _valueClass);
}
return _parseShort(ctxt, p, _valueClass);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,11 @@ public void testEmptyStringFailForBooleanPrimitive() throws IOException

public void testEmptyStringFailForPrimitives() throws IOException
{
_verifyEmptyStringFailForPrimitives("byteValue");
// 12-Jun-2020, tatu: Empty String coercion is not same as explicit
// `null`, so some of these do not apply:
// _verifyEmptyStringFailForPrimitives("byteValue");
_verifyEmptyStringFailForPrimitives("charValue");
_verifyEmptyStringFailForPrimitives("shortValue");
// _verifyEmptyStringFailForPrimitives("shortValue");
_verifyEmptyStringFailForPrimitives("intValue");
_verifyEmptyStringFailForPrimitives("longValue");
_verifyEmptyStringFailForPrimitives("floatValue");
Expand Down

0 comments on commit 359ad71

Please sign in to comment.