Skip to content

Commit

Permalink
Replace the special character with a space
Browse files Browse the repository at this point in the history
See https://bugs.openjdk.org/browse/JDK-8284840. For the assertion to succeed,
special character is replaced by a normal space.
  • Loading branch information
vpa1977 authored and cowtowncoder committed Jan 17, 2024
1 parent 775d72c commit 053324a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/tools/jackson/datatype/joda/DateTimeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ public void testCustomPatternStyle() throws IOException
if (json.contains(",")) {
json = json.replace(", ", " ");
}
// https://bugs.openjdk.org/browse/JDK-8284840
// Java 21 uses NBSP/NNBSP prefixed to AM/PM in time format, instead of a normal space
if (json.contains("\u202f")) {
json = json.replace("\u202f", " ");
}

assertEquals(aposToQuotes("{'date':'1/1/70 12:00 AM'}"), json);
}

Expand Down

0 comments on commit 053324a

Please sign in to comment.