You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/06/22 13:15:38 UTC

[commons-lang] 02/02: Formatting.

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

commit b7b4ae33dc1f275297a5125ca7ed323756130dff
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jun 22 09:15:29 2020 -0400

    Formatting.
---
 src/main/java/org/apache/commons/lang3/time/DateUtils.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/time/DateUtils.java b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
index 1df4e83..fd34049 100644
--- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
@@ -361,14 +361,14 @@ public class DateUtils {
      * @throws ParseException if none of the date patterns were suitable
      * @see java.util.Calendar#isLenient()
      */
-    private static Date parseDateWithLeniency(
-            final String str, final Locale locale, final String[] parsePatterns, final boolean lenient) throws ParseException {
+    private static Date parseDateWithLeniency(final String str, final Locale locale, final String[] parsePatterns,
+        final boolean lenient) throws ParseException {
         if (str == null || parsePatterns == null) {
             throw new IllegalArgumentException("Date and Patterns must not be null");
         }
 
         final TimeZone tz = TimeZone.getDefault();
-        final Locale lcl = locale==null ? Locale.getDefault() : locale;
+        final Locale lcl = locale == null ? Locale.getDefault() : locale;
         final ParsePosition pos = new ParsePosition(0);
         final Calendar calendar = Calendar.getInstance(tz, lcl);
         calendar.setLenient(lenient);
@@ -377,10 +377,10 @@ public class DateUtils {
             final FastDateParser fdp = new FastDateParser(parsePattern, tz, lcl);
             calendar.clear();
             try {
-                if (fdp.parse(str, pos, calendar) && pos.getIndex()==str.length()) {
+                if (fdp.parse(str, pos, calendar) && pos.getIndex() == str.length()) {
                     return calendar.getTime();
                 }
-            } catch(final IllegalArgumentException ignore) {
+            } catch (final IllegalArgumentException ignore) {
                 // leniency is preventing calendar from being set
             }
             pos.setIndex(0);