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 25def60f6e..b9a67e5cf1 100644 --- a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java +++ b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java @@ -1043,8 +1043,7 @@ public VerificationResult do_verify() { try { delayedPass2Checks(); } catch (final ClassConstraintException | ClassFormatException cce) { - vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage()); - return vr; + return new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage()); } try { pass3StaticInstructionChecks(); diff --git a/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java b/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java index 762f6fdbb2..056453c1b0 100644 --- a/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java +++ b/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java @@ -291,8 +291,7 @@ public AnnotationEntryGen createSimpleInvisibleAnnotation(final ConstantPoolGen final ObjectType t = new ObjectType("SimpleAnnotation"); final List elements = new ArrayList<>(); elements.add(nvGen); - final AnnotationEntryGen a = new AnnotationEntryGen(t, elements, false, cp); - return a; + return new AnnotationEntryGen(t, elements, false, cp); } public AnnotationEntryGen createSimpleVisibleAnnotation(final ConstantPoolGen cp) { @@ -301,8 +300,7 @@ public AnnotationEntryGen createSimpleVisibleAnnotation(final ConstantPoolGen cp final ObjectType t = new ObjectType("SimpleAnnotation"); final List elements = new ArrayList<>(); elements.add(nvGen); - final AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp); - return a; + return new AnnotationEntryGen(t, elements, true, cp); } private void dumpClass(final ClassGen cg, final String fname) { diff --git a/src/test/java/org/apache/bcel/util/BCELifierTestCase.java b/src/test/java/org/apache/bcel/util/BCELifierTestCase.java index 8ab68d6c6d..9e66445464 100644 --- a/src/test/java/org/apache/bcel/util/BCELifierTestCase.java +++ b/src/test/java/org/apache/bcel/util/BCELifierTestCase.java @@ -48,8 +48,7 @@ public class BCELifierTestCase extends AbstractTestCase { private String canonHashRef(String input) { input = input.replaceAll("#\\d+", "#n"); // numbers may vary in length input = input.replaceAll(" +", " "); // collapse spaces - input = input.replaceAll("//.+", ""); // comments may vary - return input; + return input.replaceAll("//.+", ""); } private String exec(final File workDir, final String... args) throws Exception {