diff --git a/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnpairedSurrogateRemover.java b/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnpairedSurrogateRemover.java index 0115422aa..b171f7e5f 100644 --- a/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnpairedSurrogateRemover.java +++ b/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnpairedSurrogateRemover.java @@ -34,12 +34,9 @@ public class UnicodeUnpairedSurrogateRemover extends CodePointTranslator { */ @Override public boolean translate(final int codepoint, final Writer out) throws IOException { - if (codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE) { - // It's a surrogate. Write nothing and say we've translated. - return true; - } + // true: It's a surrogate. Write nothing and say we've translated. + return codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE; // It's not a surrogate. Don't translate it. - return false; } } 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 9ae683b85..b8db4d725 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -820,8 +820,8 @@ public class FastDateParser implements DateParser, Serializable { private final Map tzNames= new HashMap<>(); private static class TzInfo { - TimeZone zone; - int dstOffset; + final TimeZone zone; + final int dstOffset; TzInfo(final TimeZone tz, final boolean useDst) { zone = tz;