Skip to content

Commit

Permalink
renamed shouldBeKept
Browse files Browse the repository at this point in the history
  • Loading branch information
plutasnyy committed Aug 28, 2018
1 parent 4bfedf0 commit 1e367f6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SuiteAggregationCounter {

public static final String NAME_KEY = "suiteAggregationCounter";

private final int suitesToAggregate;
private int suitesToAggregate;

public SuiteAggregationCounter() {
this.suitesToAggregate = 0;
Expand All @@ -29,7 +29,7 @@ public int getSuitesToAggregate() {
return suitesToAggregate;
}

public int addSuitesToAggregate(int suitesToAggregate) {
return this.suitesToAggregate + suitesToAggregate;
public void addSuitesToAggregate(int suitesToAggregate) {
this.suitesToAggregate += suitesToAggregate;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void process(Exchange exchange) throws Exception {
ReferencedArtifactsMessageBody body = new ReferencedArtifactsMessageBody(
messageBody.getData().getName(),
messageBody.getDbKey());
if (messageBody.shouldBeKeeped()) {
if (messageBody.shouldBeKept()) {
body.setArtifactsToKeep(metatadaArtifacts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void process(Exchange exchange) throws Exception {
}
}

public static Set<String> getArtifactsIdsToRemove(ArtifactsDAO artifactsDAO,
static Set<String> getArtifactsIdsToRemove(ArtifactsDAO artifactsDAO,
ReferencedArtifactsMessageBody messageBody) {
Set<String> artifactsToRemove = artifactsDAO.getArtifactsIds(messageBody.getDbKey());
artifactsToRemove.removeAll(messageBody.getArtifactsToKeep());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public SuiteMessageBody(Suite data, DBKey dbKey, boolean toRemove) {
this.toRemove = toRemove;
}

public boolean shouldBeKeeped() {
public boolean shouldBeKept() {
return !toRemove;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void configure() throws Exception {
.process(suitesRemovePredicateProcessor)
.split(body())
.choice()
.when(body().method("shouldBeKeeped").isEqualTo(false)).to(direct("removeMetadata"))
.when(body().method("shouldBeKept").isEqualTo(false)).to(direct("removeMetadata"))
.otherwise().to(direct("getMetadataArtifacts"))
.endChoice();

Expand Down

0 comments on commit 1e367f6

Please sign in to comment.