From d4ebf9abcccdb0347a94172e1da97aa692e20336 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 10 Oct 2023 15:39:05 -0400 Subject: [PATCH] Fix Checkstyle [INFO] There are 4 errors reported by Checkstyle 10.12.4 with src/site/resources/checkstyle/checkstyle.xml ruleset. [ERROR] src\main\java\org\apache\commons\lang3\StringUtils.java:[1869,92] (whitespace) WhitespaceAfter: '...' is not followed by whitespace. [ERROR] src\main\java\org\apache\commons\lang3\time\FastDatePrinter.java:[1454,13] (whitespace) WhitespaceAfter: 'switch' is not followed by whitespace. [ERROR] src\test\java\org\apache\commons\lang3\time\FastDateFormatTest.java:[285,17] (whitespace) WhitespaceAfter: 'synchronized' is not followed by whitespace. [ERROR] src\test\java\org\apache\commons\lang3\time\FastDateFormatTest.java:[292,17] (whitespace) WhitespaceAfter: 'synchronized' is not followed by whitespace. --- src/changes/changes.xml | 2 +- src/main/java/org/apache/commons/lang3/StringUtils.java | 2 +- .../java/org/apache/commons/lang3/time/FastDatePrinter.java | 2 +- .../org/apache/commons/lang3/time/FastDateFormatTest.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 2e5cf9082..83bbc1799 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -70,7 +70,7 @@ The type attribute can be add,update,fix,remove. Add LocaleUtils.isLanguageUndetermined(Locale). Add Add ObjectUtils.toString(Supplier<Object>, Supplier<String>). - Bump commons-parent from 58 to 62. + Bump commons-parent from 58 to 64. Bump org.easymock:easymock from 5.1.0 to 5.2.0 #1104. diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index fbf10227a..7d924eb5e 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -1866,7 +1866,7 @@ public class StringUtils { * {@code false} if {@code searchStrings} is null or contains no matches. * @since 3.5 */ - public static boolean equalsAnyIgnoreCase(final CharSequence string, final CharSequence...searchStrings) { + public static boolean equalsAnyIgnoreCase(final CharSequence string, final CharSequence... searchStrings) { if (ArrayUtils.isNotEmpty(searchStrings)) { for (final CharSequence next : searchStrings) { if (equalsIgnoreCase(string, next)) { diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java index 11ea08ac6..bcb112ce8 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java @@ -1451,7 +1451,7 @@ public class FastDatePrinter implements DatePrinter, Serializable { * rule exists, an IllegalArgumentException will be thrown. */ static Iso8601_Rule getRule(final int tokenLen) { - switch(tokenLen) { + switch (tokenLen) { case 1: return ISO8601_HOURS; case 2: diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java index dda25cb47..8350c42d3 100644 --- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java +++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java @@ -282,14 +282,14 @@ public class FastDateFormatTest extends AbstractLangTest { public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition fieldPosition) { - synchronized(this) { + synchronized (this) { return inner.format(obj, toAppendTo, fieldPosition); } } @Override public Object parseObject(final String source, final ParsePosition pos) { - synchronized(this) { + synchronized (this) { return inner.parseObject(source, pos); } }