Skip to content

Commit

Permalink
Avoid incorrect Extract and Move Method in commit
Browse files Browse the repository at this point in the history
junit-team/junit4@aad22b8
public getOrderedRules() : List<TestRule> extracted from protected classRules() : List<TestRule> in class org.junit.runners.ParentRunner & moved to class org.junit.runners.ParentRunner.ClassRuleCollector
  • Loading branch information
tsantalis committed Jan 2, 2025
1 parent 27d3ef8 commit 0a4a83b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3610,6 +3610,11 @@ public boolean containsOnlyBlockMappings() {
if(mapping.getFragment1().getLocationInfo().getCodeElementType().equals(CodeElementType.BLOCK) && mapping.getFragment2().getLocationInfo().getCodeElementType().equals(CodeElementType.BLOCK)) {
count++;
}
else if(mapping.getFragment1().getVariables().size() == 1 && mapping.getFragment2().getVariables().size() == 1 &&
mapping.getFragment1().getString().equals(JAVA.RETURN_SPACE + mapping.getFragment1().getVariables().get(0).getString() + JAVA.STATEMENT_TERMINATION) &&
mapping.getFragment2().getString().equals(JAVA.RETURN_SPACE + mapping.getFragment2().getVariables().get(0).getString() + JAVA.STATEMENT_TERMINATION)) {
count++;
}
}
return count > 0 && count == getMappings().size();
}
Expand Down

0 comments on commit 0a4a83b

Please sign in to comment.