Skip to content

Commit

Permalink
Remove variable assignment just before returning it
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Feb 4, 2024
1 parent 8fbf942 commit e1e5f5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ public AnnotationEntryGen createSimpleInvisibleAnnotation(final ConstantPoolGen
final ObjectType t = new ObjectType("SimpleAnnotation");
final List<ElementValuePairGen> 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) {
Expand All @@ -301,8 +300,7 @@ public AnnotationEntryGen createSimpleVisibleAnnotation(final ConstantPoolGen cp
final ObjectType t = new ObjectType("SimpleAnnotation");
final List<ElementValuePairGen> 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) {
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/org/apache/bcel/util/BCELifierTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e1e5f5e

Please sign in to comment.