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 2024/08/18 12:49:22 UTC
(commons-beanutils) 11/32: Use else if
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 <ga...@gmail.com>
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);
}