This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch 1.X in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
commit 22aab7cc70cbf4909bcc08d72e3cd6c2ab3aa5b8 Author: Gary Gregory <[email protected]> AuthorDate: Sun Jul 26 09:36:31 2026 -0400 Use String.isEmpty() --- .../org/apache/commons/beanutils/MappedPropertyDescriptor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java b/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java index 26222ea4..a1bf792d 100644 --- a/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java +++ b/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java @@ -174,7 +174,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { * @param s The property name */ private static String capitalizePropertyName(final String s) { - if (s.length() == 0) { + if (s.isEmpty()) { return s; } @@ -299,7 +299,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { super(propertyName, null, null); - if (propertyName == null || propertyName.length() == 0) { + if (propertyName == null || propertyName.isEmpty()) { throw new IntrospectionException("bad property name: " + propertyName + " on class: " + beanClass.getClass().getName()); } @@ -365,7 +365,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { super(propertyName, null, null); - if (propertyName == null || propertyName.length() == 0) { + if (propertyName == null || propertyName.isEmpty()) { throw new IntrospectionException("bad property name: " + propertyName); } @@ -411,7 +411,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { super(propertyName, mappedGetter, mappedSetter); - if (propertyName == null || propertyName.length() == 0) { + if (propertyName == null || propertyName.isEmpty()) { throw new IntrospectionException("bad property name: " + propertyName); }
