From e5a921f9f1dc556bc5cf2f92d65b67ed040cf7b4 Mon Sep 17 00:00:00 2001 From: jochenberger Date: Fri, 23 Jun 2017 10:50:24 +0200 Subject: [PATCH] Fix cast --- .../jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-path/src/main/java/com/jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java b/json-path/src/main/java/com/jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java index 68e36e43..635c7bc1 100644 --- a/json-path/src/main/java/com/jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java +++ b/json-path/src/main/java/com/jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java @@ -116,7 +116,7 @@ public class JsonSmartMappingProvider implements MappingProvider { if(Integer.class.isAssignableFrom(src.getClass())){ return (Integer) src; } else if (Long.class.isAssignableFrom(src.getClass())) { - return ((Integer) src).intValue(); + return ((Long) src).intValue(); } else if (Double.class.isAssignableFrom(src.getClass())) { return ((Double) src).intValue(); } else if (BigDecimal.class.isAssignableFrom(src.getClass())) {