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
commit 16f75b24972122cf357de6f5165ab3a4e8d8004f Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Sun Dec 29 10:35:16 2024 -0500 Add Checkstyle RightCurly Remove comment that doesn't match code --- src/conf/checkstyle/checkstyle.xml | 1 + src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java | 4 +--- .../java/org/apache/bcel/verifier/statics/StringRepresentation.java | 4 +--- .../java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java | 5 ++--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/conf/checkstyle/checkstyle.xml b/src/conf/checkstyle/checkstyle.xml index 5aa62d58..8130d8ab 100644 --- a/src/conf/checkstyle/checkstyle.xml +++ b/src/conf/checkstyle/checkstyle.xml @@ -75,6 +75,7 @@ limitations under the License. <module name="NeedBraces" /> <module name="RedundantImport" /> <module name="RedundantModifier" /> + <module name="RightCurly" /> <module name="SimplifyBooleanExpression" /> <module name="SimplifyBooleanReturn" /> <module name="StringLiteralEquality" /> diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java index acd5f466..deeb8eb6 100644 --- a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java +++ b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java @@ -1199,9 +1199,7 @@ public final class Pass3aVerifier extends PassVerifier { String ret; try { ret = obj.toString(); - } - - catch (final RuntimeException e) { + } catch (final RuntimeException e) { // including ClassFormatException, trying to convert the "signature" of a ReturnaddressType LocalVariable // (shouldn't occur, but people do crazy things) String s = obj.getClass().getName(); diff --git a/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java b/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java index c3de2ac7..9a2cc1a6 100644 --- a/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java +++ b/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java @@ -120,9 +120,7 @@ public class StringRepresentation extends org.apache.bcel.classfile.EmptyVisitor String ret; try { ret = obj.toString(); - } - - catch (final RuntimeException e) { + } catch (final RuntimeException e) { // including ClassFormatException, trying to convert the "signature" of a ReturnaddressType LocalVariable // (shouldn't occur, but people do crazy things) String s = obj.getClass().getName(); diff --git a/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java b/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java index 41e05a13..1c826ab5 100644 --- a/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java +++ b/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java @@ -127,12 +127,11 @@ public class ExecutionVisitor extends EmptyVisitor { @Override public void visitAALOAD(final AALOAD o) { stack().pop(); // pop the index int -//System.out.print(stack().peek()); + // System.out.print(stack().peek()); final Type t = stack().pop(); // Pop Array type if (t == Type.NULL) { stack().push(Type.NULL); - } // Do nothing stackwise --- a NullPointerException is thrown at Run-Time - else { + } else { final ArrayType at = (ArrayType) t; stack().push(at.getElementType()); }