From 3e6255ec52cd10848d8ce627aca98f8c4d2bb045 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 21 Mar 2022 11:36:01 -0400 Subject: [PATCH] Fix Checkstyle. --- src/main/java/org/apache/commons/lang3/builder/Diff.java | 2 +- .../org/apache/commons/lang3/time/FastDateParser.java | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/builder/Diff.java b/src/main/java/org/apache/commons/lang3/builder/Diff.java index 47509b667..a7be8b0fa 100644 --- a/src/main/java/org/apache/commons/lang3/builder/Diff.java +++ b/src/main/java/org/apache/commons/lang3/builder/Diff.java @@ -46,7 +46,7 @@ public abstract class Diff extends Pair { /** The field type. */ private final Type type; - + /** The field name. */ private final String fieldName; diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java index 8b70a257a..679eabcf3 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -88,10 +88,10 @@ public class FastDateParser implements DateParser, Serializable { /** Input TimeZone. */ private final TimeZone timeZone; - + /** Input Locale. */ private final Locale locale; - + /** * Century from Date. */ @@ -666,9 +666,7 @@ public class FastDateParser implements DateParser, Serializable { */ private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) { final ConcurrentMap cache = getCache(field); - return cache.computeIfAbsent(locale, k -> { - return field == Calendar.ZONE_OFFSET ? new TimeZoneStrategy(locale) : new CaseInsensitiveTextStrategy(field, definingCalendar, locale); - }); + return cache.computeIfAbsent(locale, k -> (field == Calendar.ZONE_OFFSET ? new TimeZoneStrategy(locale) : new CaseInsensitiveTextStrategy(field, definingCalendar, locale))); } /**