Browse Source

Fix cast

pull/363/head
jochenberger 7 years ago committed by GitHub
parent
commit
e5a921f9f1
  1. 2
      json-path/src/main/java/com/jayway/jsonpath/spi/mapper/JsonSmartMappingProvider.java

2
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())){ if(Integer.class.isAssignableFrom(src.getClass())){
return (Integer) src; return (Integer) src;
} else if (Long.class.isAssignableFrom(src.getClass())) { } else if (Long.class.isAssignableFrom(src.getClass())) {
return ((Integer) src).intValue(); return ((Long) src).intValue();
} else if (Double.class.isAssignableFrom(src.getClass())) { } else if (Double.class.isAssignableFrom(src.getClass())) {
return ((Double) src).intValue(); return ((Double) src).intValue();
} else if (BigDecimal.class.isAssignableFrom(src.getClass())) { } else if (BigDecimal.class.isAssignableFrom(src.getClass())) {

Loading…
Cancel
Save