This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
The following commit(s) were added to refs/heads/master by this push:
new 4f241cf Use isEmpty().
4f241cf is described below
commit 4f241cf8eced082a24f5345e72fb4af8d3b1377b
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 17 08:59:41 2021 -0500
Use isEmpty().
---
src/main/java/org/apache/bcel/classfile/Utility.java | 2 +-
src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/bcel/classfile/Utility.java
b/src/main/java/org/apache/bcel/classfile/Utility.java
index d5b93b2..c9112fb 100644
--- a/src/main/java/org/apache/bcel/classfile/Utility.java
+++ b/src/main/java/org/apache/bcel/classfile/Utility.java
@@ -831,7 +831,7 @@ public abstract class Utility {
// Could be Class or Type...
type = typeSignatureToString(signature.substring(index), chopit);
index += unwrap(CONSUMER_CHARS); // update position
- if ((typeParams.length() == 0) && (index == signature.length())) {
+ if ((typeParams.isEmpty()) && (index == signature.length())) {
// We have a Type signature.
return type;
}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
index 07c5df6..00ab595 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
@@ -1484,7 +1484,7 @@ public final class Pass2Verifier extends PassVerifier
implements Constants {
* represents a valid Java identifier (so-called simple name).
*/
private static boolean validJavaIdentifier(final String name) {
- if (name.length() == 0) {
+ if (name.isEmpty()) {
return false; // must not be empty, reported by
<[email protected]>, thanks!
}