File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/test/java/com/fasterxml/jackson/datatype/joda Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,13 @@ public void testAsTextNoMilliseconds() throws Exception
123
123
public void testCustomPatternStyle () throws IOException
124
124
{
125
125
// or, using annotations
126
- assertEquals (aposToQuotes ("{'date':'1/1/70 12:00 AM'}" ),
127
- STRING_MAPPER .writeValueAsString (new CustomDate (DATE_JAN_1_1970_UTC )));
126
+ // 05-May-2019, tatu: Looks like "short representation" somehow varies between JDK 8 and JDK 11?
127
+ // JDK 11 adding an extra comma. No idea how, why but... need to work around
128
+ String json = STRING_MAPPER .writeValueAsString (new CustomDate (DATE_JAN_1_1970_UTC ));
129
+ if (json .contains ("," )) {
130
+ json = json .replace (", " , " " );
131
+ }
132
+ assertEquals (aposToQuotes ("{'date':'1/1/70 12:00 AM'}" ), json );
128
133
}
129
134
130
135
public void testSerializationWithTypeInfo () throws IOException
You can’t perform that action at this time.
0 commit comments