This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bsf.git
The following commit(s) were added to refs/heads/master by this push:
new 373cd2b Use String.isEmpty()
373cd2b is described below
commit 373cd2b33cc0e6093a74855a756d2e7768341467
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 26 09:34:16 2026 -0400
Use String.isEmpty()
---
src/main/java/org/apache/bsf/util/StringUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/bsf/util/StringUtils.java
b/src/main/java/org/apache/bsf/util/StringUtils.java
index d7fc30c..cd4448c 100644
--- a/src/main/java/org/apache/bsf/util/StringUtils.java
+++ b/src/main/java/org/apache/bsf/util/StringUtils.java
@@ -237,7 +237,7 @@ public class StringUtils {
}
public static String getValidIdentifierName(final String identifierName) {
- if (identifierName == null || identifierName.length() == 0) {
+ if (identifierName == null || identifierName.isEmpty()) {
return null;
}
@@ -255,7 +255,7 @@ public class StringUtils {
}
public static boolean isValidIdentifierName(final String identifierName) {
- if (identifierName == null || identifierName.length() == 0) {
+ if (identifierName == null || identifierName.isEmpty()) {
return false;
}
@@ -277,7 +277,7 @@ public class StringUtils {
public static boolean isValidPackageName(final String packageName) {
if (packageName == null) {
return false;
- } else if (packageName.length() == 0) {
+ } else if (packageName.isEmpty()) {
// Empty is ok.
return true;
}