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 dae276d Don't need to nest else clause.
dae276d is described below
commit dae276dada456b4fd244ea617693fe1a1395db73
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jun 2 14:26:46 2020 -0400
Don't need to nest else clause.
---
.../java/org/apache/bcel/classfile/Utility.java | 43 +++++++++++-----------
1 file changed, 21 insertions(+), 22 deletions(-)
diff --git a/src/main/java/org/apache/bcel/classfile/Utility.java
b/src/main/java/org/apache/bcel/classfile/Utility.java
index bcd1cb6..93c9977 100644
--- a/src/main/java/org/apache/bcel/classfile/Utility.java
+++ b/src/main/java/org/apache/bcel/classfile/Utility.java
@@ -831,30 +831,29 @@ public abstract class Utility {
index += unwrap(consumed_chars); // update position
// ignore any throws information in the signature
return type;
- } else {
- // Could be Class or Type...
- type = typeSignatureToString(signature.substring(index), chopit);
+ }
+ // Could be Class or Type...
+ type = typeSignatureToString(signature.substring(index), chopit);
+ index += unwrap(consumed_chars); // update position
+ if ((typeParams.length() == 0) && (index == signature.length())) {
+ // We have a Type signature.
+ return type;
+ }
+ // We have a Class signature.
+ final StringBuilder typeClass = new StringBuilder(typeParams);
+ typeClass.append(" extends ");
+ typeClass.append(type);
+ if (index < signature.length()) {
+ typeClass.append(" implements ");
+ typeClass.append(typeSignatureToString(signature.substring(index),
chopit));
+ index += unwrap(consumed_chars); // update position
+ }
+ while (index < signature.length()) {
+ typeClass.append(", ");
+ typeClass.append(typeSignatureToString(signature.substring(index),
chopit));
index += unwrap(consumed_chars); // update position
- if ((typeParams.length() == 0) && (index == signature.length())) {
- // We have a Type signature.
- return type;
- }
- // We have a Class signature.
- final StringBuilder typeClass = new StringBuilder(typeParams);
- typeClass.append(" extends ");
- typeClass.append(type);
- if (index < signature.length()) {
- typeClass.append(" implements ");
-
typeClass.append(typeSignatureToString(signature.substring(index), chopit));
- index += unwrap(consumed_chars); // update position
- }
- while (index < signature.length()) {
- typeClass.append(", ");
-
typeClass.append(typeSignatureToString(signature.substring(index), chopit));
- index += unwrap(consumed_chars); // update position
- }
- return typeClass.toString();
}
+ return typeClass.toString();
}