public void testFpTypeOverrideSimple() throws Exception {
  ObjectMapper m=new ObjectMapper();
  m.enable(DeserializationConfig.Feature.USE_BIG_DECIMAL_FOR_FLOATS);
  BigDecimal dec=new BigDecimal("0.1");
  Number result=m.readValue(dec.toString(),Number.class);
  assertEquals(BigDecimal.class,result.getClass());
  assertEquals(dec,result);
  Object value=m.readValue(dec.toString(),Object.class);
  assertEquals(BigDecimal.class,result.getClass());
  assertEquals(dec,value);
}

public void testFpTypeOverrideSimple ( ) throws Exception { ObjectMapper m = new ObjectMapper ( ) ; m . enable ( DeserializationConfig . Feature . USE_BIG_DECIMAL_FOR_FLOATS ) ; BigDecimal dec = new BigDecimal ( "0.1" ) ; Number result = m . readValue ( dec . toString ( ) , Number . class ) ; assertEquals ( BigDecimal . class , result . getClass ( ) ) ; assertEquals ( dec , result ) ; Object value = m . readValue ( dec . toString ( ) , Object . class ) ; assertEquals ( BigDecimal . class , result . getClass ( ) ) ; assertEquals ( dec , value ) ; }
test for verifying [ jackson - 72 ] .
