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 2026/07/26 13:37:21 UTC
(commons-beanutils) 03/07: Use String.isEmpty()
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 <ga...@gmail.com>
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);
}
}