This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch 1.X in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
commit 609feb30e120e44fa10622bb59c4b91372e6ade6 Author: Gary Gregory <[email protected]> AuthorDate: Sun Aug 18 08:41:49 2024 -0400 Use else if --- .../locale/converters/DateLocaleConverter.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java b/src/main/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java index 0256b89b..4c25b9f9 100644 --- a/src/main/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java +++ b/src/main/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java @@ -282,18 +282,16 @@ public class DateLocaleConverter extends BaseLocaleConverter { if (thisChar == '\'') { quoted = false; } - } else { - if (thisChar == '\'') { - quoted = true; - } else if (thisChar >= 'a' && thisChar <= 'z' || - thisChar >= 'A' && thisChar <= 'Z') { - final int index = fromChars.indexOf(thisChar ); - if (index == -1) { - throw new IllegalArgumentException( - "Illegal pattern character '" + thisChar + "'"); - } - thisChar = toChars.charAt(index); + } else if (thisChar == '\'') { + quoted = true; + } else if (thisChar >= 'a' && thisChar <= 'z' || + thisChar >= 'A' && thisChar <= 'Z') { + final int index = fromChars.indexOf(thisChar ); + if (index == -1) { + throw new IllegalArgumentException( + "Illegal pattern character '" + thisChar + "'"); } + thisChar = toChars.charAt(index); } converted.append(thisChar); }
