diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java index 9960c050d6..b2ddfe79e7 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java @@ -220,7 +220,7 @@ public Boolean deserialize(JsonParser p, DeserializationContext ctxt) throws IOE return Boolean.FALSE; } if (_primitive) { - return _parseBooleanPrimitive(ctxt, p, _valueClass); + return _parseBooleanPrimitive(ctxt, p); } return _parseBoolean(ctxt, p, _valueClass); } @@ -240,7 +240,7 @@ public Boolean deserializeWithType(JsonParser p, DeserializationContext ctxt, return Boolean.FALSE; } if (_primitive) { - return _parseBooleanPrimitive(ctxt, p, _valueClass); + return _parseBooleanPrimitive(ctxt, p); } return _parseBoolean(ctxt, p, _valueClass); } @@ -267,7 +267,7 @@ public Byte deserialize(JsonParser p, DeserializationContext ctxt) throws IOExce return p.getByteValue(); } if (_primitive) { - return _parseBytePrimitive(ctxt, p, _valueClass); + return _parseBytePrimitive(ctxt, p); } return _parseByte(ctxt, p, _valueClass); } @@ -295,7 +295,7 @@ public Short deserialize(JsonParser p, DeserializationContext ctxt) return p.getShortValue(); } if (_primitive) { - return _parseShortPrimitive(ctxt, p, _valueClass); + return _parseShortPrimitive(ctxt, p); } return _parseShort(ctxt, p, _valueClass); } @@ -384,7 +384,10 @@ public Integer deserialize(JsonParser p, DeserializationContext ctxt) throws IOE if (p.hasToken(JsonToken.VALUE_NUMBER_INT)) { return p.getIntValue(); } - return _parseInteger(p, ctxt); + if (_primitive) { + return _parseIntPrimitive(ctxt, p); + } + return _parseInteger(ctxt, p, _valueClass); } // Since we can never have type info ("natural type"; String, Boolean, Integer, Double): @@ -396,56 +399,10 @@ public Integer deserializeWithType(JsonParser p, DeserializationContext ctxt, if (p.hasToken(JsonToken.VALUE_NUMBER_INT)) { return p.getIntValue(); } - return _parseInteger(p, ctxt); - } - - protected final Integer _parseInteger(JsonParser p, DeserializationContext ctxt) throws IOException - { - switch (p.currentTokenId()) { - // NOTE: caller assumed to usually check VALUE_NUMBER_INT in fast path - case JsonTokenId.ID_NUMBER_INT: - return Integer.valueOf(p.getIntValue()); - case JsonTokenId.ID_NUMBER_FLOAT: // coercing may work too - if (!ctxt.isEnabled(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) { - _failDoubleToIntCoercion(p, ctxt, "Integer"); - } - return Integer.valueOf(p.getValueAsInt()); - case JsonTokenId.ID_STRING: // let's do implicit re-parse - String text = p.getText(); - CoercionAction act = _checkFromStringCoercion(ctxt, text); - if (act == CoercionAction.AsNull) { - return (Integer) getNullValue(ctxt); - } - if (act == CoercionAction.AsEmpty) { - return (Integer) getEmptyValue(ctxt); - } - text = text.trim(); - if (_hasTextualNull(text)) { - return (Integer) _coerceTextualNull(ctxt, _primitive); - } - final int len = text.length(); - try { - if (len > 9) { - long l = Long.parseLong(text); - if (_intOverflow(l)) { - return (Integer) ctxt.handleWeirdStringValue(_valueClass, text, String.format( - "Overflow: numeric value (%s) out of range of Integer (%d - %d)", - text, Integer.MIN_VALUE, Integer.MAX_VALUE)); - } - return Integer.valueOf((int) l); - } - return Integer.valueOf(NumberInput.parseInt(text)); - } catch (IllegalArgumentException iae) { - return (Integer) ctxt.handleWeirdStringValue(_valueClass, text, - "not a valid Integer value"); - } - case JsonTokenId.ID_NULL: - return (Integer) _coerceNullToken(ctxt, _primitive); - case JsonTokenId.ID_START_ARRAY: - return _deserializeFromArray(p, ctxt); + if (_primitive) { + return _parseIntPrimitive(ctxt, p); } - // Otherwise, no can do: - return (Integer) ctxt.handleUnexpectedToken(_valueClass, p); + return _parseInteger(ctxt, p, _valueClass); } } diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java index 85a7cfcca7..31a71b5c50 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java @@ -392,7 +392,7 @@ public boolean[] deserialize(JsonParser p, DeserializationContext ctxt) _verifyNullForPrimitive(ctxt); value = false; } else { - value = _parseBooleanPrimitive(ctxt, p, Boolean.TYPE); + value = _parseBooleanPrimitive(ctxt, p); } if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); @@ -409,7 +409,7 @@ public boolean[] deserialize(JsonParser p, DeserializationContext ctxt) @Override protected boolean[] handleSingleElementUnwrapped(JsonParser p, DeserializationContext ctxt) throws IOException { - return new boolean[] { _parseBooleanPrimitive(ctxt, p, Boolean.TYPE) }; + return new boolean[] { _parseBooleanPrimitive(ctxt, p) }; } @Override @@ -508,7 +508,7 @@ public byte[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOEx _verifyNullForPrimitive(ctxt); value = (byte) 0; } else { - value = _parseBytePrimitive(ctxt, p, Byte.TYPE); + value = _parseBytePrimitive(ctxt, p); } } if (ix >= chunk.length) { @@ -602,7 +602,7 @@ public short[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOE _verifyNullForPrimitive(ctxt); value = (short) 0; } else { - value = _parseShortPrimitive(ctxt, p, Short.TYPE); + value = _parseShortPrimitive(ctxt, p); } if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); @@ -619,7 +619,7 @@ public short[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOE @Override protected short[] handleSingleElementUnwrapped(JsonParser p, DeserializationContext ctxt) throws IOException { - return new short[] { _parseShortPrimitive(ctxt, p, Short.TYPE) }; + return new short[] { _parseShortPrimitive(ctxt, p) }; } @Override @@ -680,7 +680,7 @@ public int[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOExc _verifyNullForPrimitive(ctxt); value = 0; } else { - value = _parseIntPrimitive(p, ctxt); + value = _parseIntPrimitive(ctxt, p); } if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); @@ -697,7 +697,7 @@ public int[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOExc @Override protected int[] handleSingleElementUnwrapped(JsonParser p, DeserializationContext ctxt) throws IOException { - return new int[] { _parseIntPrimitive(p, ctxt) }; + return new int[] { _parseIntPrimitive(ctxt, p) }; } @Override diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.java index a7b6022ea7..0cf0390416 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.java @@ -40,7 +40,7 @@ public StackTraceElement deserialize(JsonParser p, DeserializationContext ctxt) if (t.isNumeric()) { lineNumber = p.getIntValue(); } else { - lineNumber = _parseIntPrimitive(p, ctxt); + lineNumber = _parseIntPrimitive(ctxt, p); } } else if ("methodName".equals(propName)) { methodName = p.getText(); diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java index 9f7dc776e8..297b6f3b3b 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java @@ -355,7 +355,7 @@ protected T _deserializeWrappedValue(JsonParser p, DeserializationContext ctxt) @Deprecated // since 2.11, use overloaded variant protected final boolean _parseBooleanPrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { - return _parseBooleanPrimitive(ctxt, p, Boolean.TYPE); + return _parseBooleanPrimitive(ctxt, p); } /** @@ -369,7 +369,7 @@ protected final boolean _parseBooleanPrimitive(JsonParser p, DeserializationCont * @since 2.12 */ protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, - JsonParser p, Class targetType) + JsonParser p) throws IOException { final JsonToken t = p.currentToken(); @@ -383,7 +383,7 @@ protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, // may accept ints too, (0 == false, otherwise true) if (t == JsonToken.VALUE_NUMBER_INT) { - Boolean b = _coerceBooleanFromInt(ctxt, p, targetType); + Boolean b = _coerceBooleanFromInt(ctxt, p, Boolean.TYPE); // may get `null`, Boolean.TRUE or Boolean.FALSE so: return (b == Boolean.TRUE); } @@ -391,7 +391,7 @@ protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, if (t == JsonToken.VALUE_STRING) { String text = p.getText(); CoercionAction act = _checkFromStringCoercion(ctxt, text, - LogicalType.Boolean, targetType); + LogicalType.Boolean, Boolean.TYPE); if (act == CoercionAction.AsNull) { _verifyNullForPrimitive(ctxt); return false; @@ -411,18 +411,18 @@ protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, _verifyNullForPrimitiveCoercion(ctxt, text); return false; } - Boolean b = (Boolean) ctxt.handleWeirdStringValue(targetType, text, + Boolean b = (Boolean) ctxt.handleWeirdStringValue(Boolean.TYPE, text, "only \"true\" or \"false\" recognized"); return Boolean.TRUE.equals(b); } // 12-Jun-2020, tatu: For some reason calling `_deserializeFromArray()` won't work so: if (t == JsonToken.START_ARRAY && ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); - final boolean parsed = _parseBooleanPrimitive(ctxt, p, targetType); + final boolean parsed = _parseBooleanPrimitive(ctxt, p); _verifyEndArrayForSingle(p, ctxt); return parsed; } - return ((Boolean) ctxt.handleUnexpectedToken(targetType, p)).booleanValue(); + return ((Boolean) ctxt.handleUnexpectedToken(Boolean.TYPE, p)).booleanValue(); } protected final Boolean _parseBoolean(DeserializationContext ctxt, @@ -488,14 +488,13 @@ protected boolean _parseBooleanFromInt(JsonParser p, DeserializationContext ctxt @Deprecated // since 2.12, use overloaded variant protected final byte _parseBytePrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { - return _parseBytePrimitive(ctxt, p, Byte.TYPE); + return _parseBytePrimitive(ctxt, p); } /** * @since 2.12 */ - protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser p, - Class targetType) + protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser p) throws IOException { final JsonToken t = p.currentToken(); @@ -507,7 +506,7 @@ protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser if (t == JsonToken.VALUE_STRING) { // let's do implicit re-parse String text = p.getText(); CoercionAction act = _checkFromStringCoercion(ctxt, text, - LogicalType.Integer, targetType); + LogicalType.Integer, Byte.TYPE); if (act == CoercionAction.AsNull) { return (byte) 0; // no need to check as does not come from `null`, explicit coercion } @@ -536,7 +535,7 @@ protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser return (byte) value; } if (t == JsonToken.VALUE_NUMBER_FLOAT) { - CoercionAction act = _checkFloatToIntCoercion(ctxt, p, targetType); + CoercionAction act = _checkFloatToIntCoercion(ctxt, p, Byte.TYPE); if (act == CoercionAction.AsNull) { return (byte) 0; } @@ -548,11 +547,11 @@ protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser // 12-Jun-2020, tatu: For some reason calling `_deserializeFromArray()` won't work so: if (t == JsonToken.START_ARRAY && ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); - final byte parsed = _parseBytePrimitive(ctxt, p, targetType); + final byte parsed = _parseBytePrimitive(ctxt, p); _verifyEndArrayForSingle(p, ctxt); return parsed; } - return ((Byte) ctxt.handleUnexpectedToken(ctxt.constructType(targetType), p)).byteValue(); + return ((Byte) ctxt.handleUnexpectedToken(ctxt.constructType(Byte.TYPE), p)).byteValue(); } /** @@ -614,14 +613,13 @@ protected Byte _parseByte(DeserializationContext ctxt, JsonParser p, @Deprecated // since 2.12, use overloaded variant protected final short _parseShortPrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { - return _parseShortPrimitive(ctxt, p, Short.TYPE); + return _parseShortPrimitive(ctxt, p); } /** * @since 2.12 */ - protected final short _parseShortPrimitive(DeserializationContext ctxt, JsonParser p, - Class targetType) + protected final short _parseShortPrimitive(DeserializationContext ctxt, JsonParser p) throws IOException { final JsonToken t = p.currentToken(); @@ -633,7 +631,7 @@ protected final short _parseShortPrimitive(DeserializationContext ctxt, JsonPars if (t == JsonToken.VALUE_STRING) { // let's do implicit re-parse String text = p.getText(); CoercionAction act = _checkFromStringCoercion(ctxt, text, - LogicalType.Integer, targetType); + LogicalType.Integer, Short.TYPE); if (act == CoercionAction.AsNull) { return (short) 0; // no need to check as does not come from `null`, explicit coercion } @@ -649,23 +647,33 @@ protected final short _parseShortPrimitive(DeserializationContext ctxt, JsonPars try { value = NumberInput.parseInt(text); } catch (IllegalArgumentException iae) { - return (Short) ctxt.handleWeirdStringValue(targetType, text, + return (Short) ctxt.handleWeirdStringValue(Short.TYPE, text, "not a valid Short value"); } if (_shortOverflow(value)) { - return (Short) ctxt.handleWeirdStringValue(targetType, text, + return (Short) ctxt.handleWeirdStringValue(Short.TYPE, text, "overflow, value cannot be represented as 16-bit value"); } return (short) value; } + if (t == JsonToken.VALUE_NUMBER_FLOAT) { + CoercionAction act = _checkFloatToIntCoercion(ctxt, p, Short.TYPE); + if (act == CoercionAction.AsNull) { + return (short) 0; + } + if (act == CoercionAction.AsEmpty) { + return (short) 0; + } + return p.getShortValue(); + } // 12-Jun-2020, tatu: For some reason calling `_deserializeFromArray()` won't work so: if (t == JsonToken.START_ARRAY && ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); - final short parsed = _parseShortPrimitive(ctxt, p, targetType); + final short parsed = _parseShortPrimitive(ctxt, p); _verifyEndArrayForSingle(p, ctxt); return parsed; } - return ((Short) ctxt.handleUnexpectedToken(ctxt.constructType(targetType), p)).shortValue(); + return ((Short) ctxt.handleUnexpectedToken(ctxt.constructType(Short.TYPE), p)).shortValue(); } protected Short _parseShort(DeserializationContext ctxt, JsonParser p, @@ -701,7 +709,7 @@ protected Short _parseShort(DeserializationContext ctxt, JsonParser p, return (Short) ctxt.handleWeirdStringValue(_valueClass, text, "overflow, value cannot be represented as 16-bit value"); } - return Short.valueOf((short) value); + return (short) value; } if (t == JsonToken.VALUE_NUMBER_FLOAT) { CoercionAction act = _checkFloatToIntCoercion(ctxt, p, targetType); @@ -719,32 +727,50 @@ protected Short _parseShort(DeserializationContext ctxt, JsonParser p, return (Short) ctxt.handleUnexpectedToken(ctxt.constructType(targetType), p); } - protected final int _parseIntPrimitive(JsonParser p, DeserializationContext ctxt) +// @Deprecated // since 2.12, use overloaded variant +// protected final short _parseIntPrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { +// return _parseIntPrimitive(ctxt, p); +// } + + protected final int _parseIntPrimitive(DeserializationContext ctxt, JsonParser p) throws IOException { - if (p.hasToken(JsonToken.VALUE_NUMBER_INT)) { - return p.getIntValue(); - } + CoercionAction act; switch (p.currentTokenId()) { + case JsonTokenId.ID_NUMBER_INT: + return p.getIntValue(); + case JsonTokenId.ID_NULL: + _verifyNullForPrimitive(ctxt); + return 0; case JsonTokenId.ID_STRING: - String text = p.getText().trim(); - if (_isEmptyOrTextualNull(text)) { + String text = p.getText(); + act = _checkFromStringCoercion(ctxt, text, + LogicalType.Integer, Integer.TYPE); + if (act == CoercionAction.AsNull) { + return 0; // no need to check as does not come from `null`, explicit coercion + } + if (act == CoercionAction.AsEmpty) { + return 0; + } + text = text.trim(); + if (_hasTextualNull(text)) { _verifyNullForPrimitiveCoercion(ctxt, text); return 0; } return _parseIntPrimitive(ctxt, text); case JsonTokenId.ID_NUMBER_FLOAT: - if (!ctxt.isEnabled(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) { - _failDoubleToIntCoercion(p, ctxt, "int"); + act = _checkFloatToIntCoercion(ctxt, p, Integer.TYPE); + if (act == CoercionAction.AsNull) { + return 0; + } + if (act == CoercionAction.AsEmpty) { + return 0; } return p.getValueAsInt(); - case JsonTokenId.ID_NULL: - _verifyNullForPrimitive(ctxt); - return 0; case JsonTokenId.ID_START_ARRAY: if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); - final int parsed = _parseIntPrimitive(p, ctxt); + final int parsed = _parseIntPrimitive(ctxt, p); _verifyEndArrayForSingle(p, ctxt); return parsed; } @@ -752,7 +778,7 @@ protected final int _parseIntPrimitive(JsonParser p, DeserializationContext ctxt default: } // Otherwise, no can do: - return ((Number) ctxt.handleUnexpectedToken(_valueClass, p)).intValue(); + return ((Number) ctxt.handleUnexpectedToken(Integer.TYPE, p)).intValue(); } /** @@ -779,6 +805,68 @@ protected final int _parseIntPrimitive(DeserializationContext ctxt, String text) } } + @Deprecated // since 2.12, use overloaded variant + protected final Integer _parseInteger(JsonParser p, DeserializationContext ctxt) throws IOException { + return _parseInteger(ctxt, p, _valueClass); + } + + // @since 2.12 + protected final Integer _parseInteger(DeserializationContext ctxt, JsonParser p, + Class targetType) throws IOException + { + CoercionAction act; + switch (p.currentTokenId()) { + // NOTE: caller assumed to usually check VALUE_NUMBER_INT in fast path + case JsonTokenId.ID_NUMBER_INT: + return p.getIntValue(); + case JsonTokenId.ID_NULL: + return (Integer) _coerceNullToken(ctxt, false); + case JsonTokenId.ID_STRING: // let's do implicit re-parse + String text = p.getText(); + act = _checkFromStringCoercion(ctxt, text, + LogicalType.Integer, targetType); + if (act == CoercionAction.AsNull) { + return (Integer) getNullValue(ctxt); + } + if (act == CoercionAction.AsEmpty) { + return (Integer) getEmptyValue(ctxt); + } + text = text.trim(); + if (_hasTextualNull(text)) { + return (Integer) _coerceTextualNull(ctxt, false); + } + final int len = text.length(); + try { + if (len > 9) { + long l = Long.parseLong(text); + if (_intOverflow(l)) { + return (Integer) ctxt.handleWeirdStringValue(targetType, text, String.format( + "Overflow: numeric value (%s) out of range of Integer (%d - %d)", + text, Integer.MIN_VALUE, Integer.MAX_VALUE)); + } + return Integer.valueOf((int) l); + } + return Integer.valueOf(NumberInput.parseInt(text)); + } catch (IllegalArgumentException iae) { + return (Integer) ctxt.handleWeirdStringValue(targetType, text, + "not a valid Integer value"); + } + case JsonTokenId.ID_NUMBER_FLOAT: // coercing may work too + act = _checkFloatToIntCoercion(ctxt, p, targetType); + if (act == CoercionAction.AsNull) { + return (Integer) getNullValue(ctxt); + } + if (act == CoercionAction.AsEmpty) { + return (Integer) getEmptyValue(ctxt); + } + return p.getValueAsInt(); + case JsonTokenId.ID_START_ARRAY: + return (Integer) _deserializeFromArray(p, ctxt); + } + // Otherwise, no can do: + return (Integer) ctxt.handleUnexpectedToken(ctxt.constructType(targetType), p); + } + protected final long _parseLongPrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { diff --git a/src/test/java/com/fasterxml/jackson/databind/convert/CoerceFloatToIntTest.java b/src/test/java/com/fasterxml/jackson/databind/convert/CoerceFloatToIntTest.java index ea63ba71ca..40cfe7f7c2 100644 --- a/src/test/java/com/fasterxml/jackson/databind/convert/CoerceFloatToIntTest.java +++ b/src/test/java/com/fasterxml/jackson/databind/convert/CoerceFloatToIntTest.java @@ -71,7 +71,8 @@ private void _verifyCoerceFail(ObjectReader r, Class targetType, r.forType(targetType).readValue(doc); fail("Should not pass"); } catch (MismatchedInputException e) { - verifyException(e, "Cannot coerce a floating-point"); + verifyException(e, "Cannot coerce a floating-point", + "Cannot coerce Floating-point"); } } diff --git a/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java b/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java index adef80dab7..3b2ce782f5 100644 --- a/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java +++ b/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKScalarsTest.java @@ -542,7 +542,8 @@ public void testFloatPrimitiveNonNumeric() throws Exception */ public void testEmptyToNullCoercionForPrimitives() throws Exception { - _testEmptyToNullCoercion(int.class, Integer.valueOf(0)); +// 12-Jun-2020, tatu: Not valid any more, null <> empty String +// _testEmptyToNullCoercion(int.class, Integer.valueOf(0)); _testEmptyToNullCoercion(long.class, Long.valueOf(0)); _testEmptyToNullCoercion(double.class, Double.valueOf(0.0)); _testEmptyToNullCoercion(float.class, Float.valueOf(0.0f)); @@ -706,7 +707,7 @@ public void testEmptyStringFailForPrimitives() throws IOException // _verifyEmptyStringFailForPrimitives("byteValue"); _verifyEmptyStringFailForPrimitives("charValue"); // _verifyEmptyStringFailForPrimitives("shortValue"); - _verifyEmptyStringFailForPrimitives("intValue"); +// _verifyEmptyStringFailForPrimitives("intValue"); _verifyEmptyStringFailForPrimitives("longValue"); _verifyEmptyStringFailForPrimitives("floatValue"); _verifyEmptyStringFailForPrimitives("doubleValue");