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 909aca0cf8ac84b2d1c695c7022308929c22a581 Author: Gary Gregory <[email protected]> AuthorDate: Sun Aug 18 08:41:08 2024 -0400 Use else if --- .../org/apache/commons/beanutils/BeanUtilsBean.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/beanutils/BeanUtilsBean.java b/src/main/java/org/apache/commons/beanutils/BeanUtilsBean.java index ad1d8ad7..09b58a50 100644 --- a/src/main/java/org/apache/commons/beanutils/BeanUtilsBean.java +++ b/src/main/java/org/apache/commons/beanutils/BeanUtilsBean.java @@ -1113,15 +1113,14 @@ public class BeanUtilsBean { } else { newValue = convert(value, type.getComponentType()); } - } else { // Value into scalar - if (value instanceof String) { - newValue = getConvertUtils().convert((String) value, type); - } else if (value instanceof String[]) { - newValue = getConvertUtils().convert(((String[]) value)[0], - type); - } else { - newValue = convert(value, type); - } + // Value into scalar + } else if (value instanceof String) { + newValue = getConvertUtils().convert((String) value, type); + } else if (value instanceof String[]) { + newValue = getConvertUtils().convert(((String[]) value)[0], + type); + } else { + newValue = convert(value, type); } // Invoke the setter method
