Use String.replace() instead of String.replaceAll().

This commit is contained in:
Gary Gregory 2021-03-02 10:36:40 -05:00
parent 80a9a5dcbf
commit b59c7bfe24
1 changed files with 2 additions and 2 deletions

View File

@ -210,8 +210,8 @@ public class FastDatePrinterTest {
fdf = getInstance(pattern);
sdf = new SimpleDateFormat(pattern);
// SDF bug fix starting with Java 7
assertEquals(sdf.format(date1).replaceAll("2003 03 03 03", "2003 2003 03 2003"), fdf.format(date1));
assertEquals(sdf.format(date2).replaceAll("2003 03 03 03", "2003 2003 03 2003"), fdf.format(date2));
assertEquals(sdf.format(date1).replace("2003 03 03 03", "2003 2003 03 2003"), fdf.format(date1));
assertEquals(sdf.format(date2).replace("2003 03 03 03", "2003 2003 03 2003"), fdf.format(date2));
}
@Test