From b59c7bfe249fc2d278f43492daf726b53eb8b28d Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 2 Mar 2021 10:36:40 -0500 Subject: [PATCH] Use String.replace() instead of String.replaceAll(). --- .../org/apache/commons/lang3/time/FastDatePrinterTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java index f3511a51e..8a68720f4 100644 --- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java +++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java @@ -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