This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new cd013c9  Use less mysterious names.
cd013c9 is described below

commit cd013c9239b1c9d2f9c910879155daae3f216eef
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Dec 29 13:23:19 2020 -0500

    Use less mysterious names.
---
 .../commons/lang3/time/FastDateParserTest.java     | 27 +++++++++++-----------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java 
b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
index 9e6dd1b..0a1e436 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
@@ -104,8 +104,8 @@ public class FastDateParserTest {
         );
     }
 
-    private static Calendar initializeCalendar(final TimeZone tz) {
-        final Calendar cal = Calendar.getInstance(tz);
+    private static Calendar initializeCalendar(final TimeZone timeZone) {
+        final Calendar cal = Calendar.getInstance(timeZone);
         cal.set(Calendar.YEAR, 2001);
         cal.set(Calendar.MONTH, 1); // not daylight savings
         cal.set(Calendar.DAY_OF_MONTH, 4);
@@ -117,22 +117,23 @@ public class FastDateParserTest {
     }
 
     private final TriFunction<String, TimeZone, Locale, DateParser> 
dateParserProvider = (format, timeZone,
-        locale) -> new FastDateParser(format, timeZone, locale, null);
+            locale) -> new FastDateParser(format, timeZone, locale, null);
 
-    static void checkParse(final Locale locale, final Calendar cal, final 
SimpleDateFormat sdf, final DateParser fdf) {
-        final String formattedDate = sdf.format(cal.getTime());
-        checkParse(locale, sdf, fdf, formattedDate);
-        checkParse(locale, sdf, fdf, formattedDate.toLowerCase(locale));
-        checkParse(locale, sdf, fdf, formattedDate.toUpperCase(locale));
+    static void checkParse(final Locale locale, final Calendar cal, final 
SimpleDateFormat simpleDateFormat,
+            final DateParser dateParser) {
+        final String formattedDate = simpleDateFormat.format(cal.getTime());
+        checkParse(locale, simpleDateFormat, dateParser, formattedDate);
+        checkParse(locale, simpleDateFormat, dateParser, 
formattedDate.toLowerCase(locale));
+        checkParse(locale, simpleDateFormat, dateParser, 
formattedDate.toUpperCase(locale));
     }
 
-    static void checkParse(final Locale locale, final SimpleDateFormat sdf, 
final DateParser fdf,
-        final String formattedDate) {
+    static void checkParse(final Locale locale, final SimpleDateFormat 
simpleDateFormat, final DateParser dateParser,
+            final String formattedDate) {
         try {
-            final Date expectedTime = sdf.parse(formattedDate);
-            final Date actualTime = fdf.parse(formattedDate);
+            final Date expectedTime = simpleDateFormat.parse(formattedDate);
+            final Date actualTime = dateParser.parse(formattedDate);
             assertEquals(expectedTime, actualTime, "locale : " + locale + ", 
formattedDate : " + formattedDate
-                + ", Java: " + SystemUtils.JAVA_RUNTIME_VERSION + "\n");
+                    + ", Java: " + SystemUtils.JAVA_RUNTIME_VERSION + "\n");
         } catch (final Exception e) {
             fail("locale : " + locale + " formattedDate : " + formattedDate + 
" error : " + e + "\n", e);
         }

Reply via email to