@@ -0,0 +1,2813 @@
+package com.fasterxml.jackson.dataformat.xml.deser;%0A%0Aimport java.math.BigDecimal;%0A%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0Aimport com.fasterxml.jackson.annotation.JsonRootName;%0Aimport com.fasterxml.jackson.annotation.JsonSubTypes;%0Aimport com.fasterxml.jackson.annotation.JsonTypeInfo;%0Aimport com.fasterxml.jackson.annotation.JsonUnwrapped;%0A%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.fasterxml.jackson.dataformat.xml.XmlMapper;%0Aimport com.fasterxml.jackson.dataformat.xml.XmlTestBase;%0A%0A// Tests copied from databind %22JDKNumberDeserTest%22 (only a small subset)%0Apublic class NumberDeserWithXMLTest extends XmlTestBase%0A%7B%0A    // %5Bdatabind#2644%5D%0A    @JsonRootName(%22Root%22)%0A    static class NodeRoot2644 %7B%0A        public String type;%0A%0A        @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = %22type%22)%0A        @JsonSubTypes(value = %7B%0A                @JsonSubTypes.Type(value = NodeParent2644.class, name = %22NodeParent%22)%0A        %7D)%0A        public Node2644 node;%0A    %7D%0A%0A    public static class NodeParent2644 extends Node2644 %7B %7D%0A%0A    public static abstract class Node2644 %7B%0A        @JsonProperty(%22amount%22)%0A        BigDecimal val;%0A%0A        public BigDecimal getVal() %7B%0A            return val;%0A        %7D%0A%0A        public void setVal(BigDecimal val) %7B%0A            this.val = val;%0A        %7D%0A    %7D%0A%0A    // %5Bdatabind#2784%5D%0A    static class BigDecimalHolder2784 %7B%0A        public BigDecimal value;%0A    %7D%0A%0A    @JsonRootName(%22Nested%22)%0A    static class NestedBigDecimalHolder2784 %7B%0A        @JsonUnwrapped%0A        public BigDecimalHolder2784 holder;%0A    %7D%0A%0A    /*%0A    /**********************************************************************%0A    /* Test methods%0A    /**********************************************************************%0A     */%0A%0A    private final XmlMapper MAPPER = newMapper();%0A%0A    // %5Bdatabind#2644%5D%0A    public void testBigDecimalSubtypes() throws Exception%0A    %7B%0A        ObjectMapper mapper = mapperBuilder()%0A                .registerSubtypes(NodeParent2644.class)%0A                .build();%0A        NodeRoot2644 root = mapper.readValue(%22%3CRoot%3E%5Cn%22%0A                +%22%3Ctype%3ENodeParent%3C/type%3E%22%0A                +%22%3Cnode%3E%3Camount%3E9999999999999999.99%3C/amount%3E%3C/node%3E%5Cn%22%0A                +%22%3C/Root%3E%5Cn%22,%0A                NodeRoot2644.class%0A        );%0A%0A        assertEquals(new BigDecimal(%229999999999999999.99%22), root.node.getVal());%0A    %7D%0A%0A    // %5Bdatabind#2784%5D%0A    public void testBigDecimalUnwrapped() throws Exception%0A    %7B%0A        // mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);%0A        final String DOC = %22%3CNested%3E%3Cvalue%3E5.00%3C/value%3E%3C/Nested%3E%22;%0A        NestedBigDecimalHolder2784 result = MAPPER.readValue(DOC, NestedBigDecimalHolder2784.class);%0A        assertEquals(new BigDecimal(%225.00%22), result.holder.value);%0A    %7D%0A%7D%0A

Add BigDecimal-related test (wrt holding precision)