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 f3d6c348947e58a9672c497c875a614f08bc054e
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 26 09:36:31 2026 -0400

    Use String.isEmpty()
---
 src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java 
b/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
index ee89bcad..f597c960 100644
--- a/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
+++ b/src/main/java/org/apache/commons/beanutils/PropertyUtilsBean.java
@@ -443,7 +443,7 @@ public class PropertyUtilsBean {
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
-        if (name == null || name.length() == 0) {
+        if (name == null || name.isEmpty()) {
             if (bean.getClass().isArray()) {
                 return Array.get(bean, index);
             }
@@ -1027,7 +1027,7 @@ public class PropertyUtilsBean {
 
         if (resolver.isMapped(propertyName)) {
             final String name = resolver.getProperty(propertyName);
-            if (name == null || name.length() == 0) {
+            if (name == null || name.isEmpty()) {
                 propertyName = resolver.getKey(propertyName);
             }
         }
@@ -1503,7 +1503,7 @@ public class PropertyUtilsBean {
         if (bean == null) {
             throw new IllegalArgumentException("No bean specified");
         }
-        if (name == null || name.length() == 0) {
+        if (name == null || name.isEmpty()) {
             if (bean.getClass().isArray()) {
                 Array.set(bean, index, value);
                 return;
@@ -1856,7 +1856,7 @@ public class PropertyUtilsBean {
 
         if (resolver.isMapped(propertyName)) {
             final String name = resolver.getProperty(propertyName);
-            if (name == null || name.length() == 0) {
+            if (name == null || name.isEmpty()) {
                 propertyName = resolver.getKey(propertyName);
             }
         }

Reply via email to