File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed 
cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/mapper 
smile/src/test/java/com/fasterxml/jackson/dataformat/smile/mapper Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 88
99import  com .fasterxml .jackson .annotation .JsonCreator ;
1010import  com .fasterxml .jackson .annotation .JsonUnwrapped ;
11+ import  com .fasterxml .jackson .annotation .JsonValue ;
1112import  com .fasterxml .jackson .core .JsonParser .NumberType ;
1213import  com .fasterxml .jackson .core .JsonToken ;
1314import  com .fasterxml .jackson .databind .ObjectMapper ;
@@ -54,7 +55,8 @@ static class DeserializationIssue4917 {
5455    }
5556
5657    static  class  DecimalHolder4917  {
57-         public  BigDecimal  value ;
58+         @ JsonValue 
59+         BigDecimal  value ;
5860
5961        private  DecimalHolder4917 (BigDecimal  value ) {
6062            this .value  = value ;
@@ -66,7 +68,6 @@ static DecimalHolder4917 of(BigDecimal value) {
6668        }
6769    }
6870
69- 
7071    /* 
7172    /********************************************************** 
7273    /* Test methods 
@@ -286,6 +287,7 @@ public void testIssue4917() throws Exception {
286287        value .decimalHolder  = DecimalHolder4917 .of (new  BigDecimal (bd ));
287288        value .number  = d ;
288289        final  byte [] data  = MAPPER .writeValueAsBytes (value );
290+ 
289291        final  DeserializationIssue4917  result  = MAPPER .readValue (
290292                data , DeserializationIssue4917 .class );
291293        assertEquals (value .decimalHolder .value , result .decimalHolder .value );
Original file line number Diff line number Diff line change 11package  com .fasterxml .jackson .dataformat .smile .mapper ;
22
33import  com .fasterxml .jackson .annotation .JsonCreator ;
4+ import  com .fasterxml .jackson .annotation .JsonValue ;
45import  com .fasterxml .jackson .dataformat .smile .BaseTestForSmile ;
56import  com .fasterxml .jackson .dataformat .smile .databind .SmileMapper ;
67import  org .junit .jupiter .api .Test ;
78
8- import  java .io .ByteArrayInputStream ;
9- import  java .io .ByteArrayOutputStream ;
109import  java .math .BigDecimal ;
1110
1211import  static  org .junit .jupiter .api .Assertions .assertEquals ;
@@ -19,7 +18,8 @@ static class DeserializationIssue4917 {
1918    }
2019
2120    static  class  DecimalHolder4917  {
22-         public  BigDecimal  value ;
21+         @ JsonValue 
22+         BigDecimal  value ;
2323
2424        private  DecimalHolder4917 (BigDecimal  value ) {
2525            this .value  = value ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments