File tree 1 file changed +9
-12
lines changed
src/test/java/com/fasterxml/jackson/databind/deser/jdk
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -104,27 +104,24 @@ public void testBigIntegerUnlimited() throws Exception
104
104
105
105
// [databind#4435]
106
106
@ Test
107
- public void testNumberStartingWithDot () throws Exception
108
- {
109
- String num = ".555555555555555555555555555555" ;
110
- BigDecimalWrapper w = MAPPER .readValue ("{\" number\" :\" " + num + "\" }" , BigDecimalWrapper .class );
111
- assertEquals (new BigDecimal (num ), w .number );
107
+ public void testNumberStartingWithDot () throws Exception {
108
+ _testNumberWith (".555555555555555555555555555555" );
112
109
}
113
110
114
111
// [databind#4435]
115
112
@ Test
116
- public void testNumberStartingWithMinusDot () throws Exception
117
- {
118
- String num = "-.555555555555555555555555555555" ;
119
- BigDecimalWrapper w = MAPPER .readValue ("{\" number\" :\" " + num + "\" }" , BigDecimalWrapper .class );
120
- assertEquals (new BigDecimal (num ), w .number );
113
+ public void testNumberStartingWithMinusDot () throws Exception {
114
+ _testNumberWith ("-.555555555555555555555555555555" );
121
115
}
122
116
123
117
// [databind#4435]
124
118
@ Test
125
- public void testNumberStartingWithPlusDot () throws Exception
119
+ public void testNumberStartingWithPlusDot () throws Exception {
120
+ _testNumberWith ("+.555555555555555555555555555555" );
121
+ }
122
+
123
+ private void _testNumberWith (String num ) throws Exception
126
124
{
127
- String num = "+.555555555555555555555555555555" ;
128
125
BigDecimalWrapper w = MAPPER .readValue ("{\" number\" :\" " + num + "\" }" , BigDecimalWrapper .class );
129
126
assertEquals (new BigDecimal (num ), w .number );
130
127
}
You can’t perform that action at this time.
0 commit comments