Skip to content

Commit

Permalink
tech : code climate fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Radislav Berkovich committed Apr 29, 2019
1 parent c4b8eac commit 270231e
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,15 @@ public void cancelBuild(Cause cause, ParametersAction parametersAction) {
project.getBuilds().forEach(build -> {
if (build instanceof AbstractBuild) {
AbstractBuild aBuild = (AbstractBuild) build;
if(aBuild.isBuilding()) {
aBuild.getActions(ParametersAction.class).forEach(action -> {
if (checkSuiteIdParamsExistAndEqual(action, suiteId, suiteRunId)) {
try {
aBuild.doStop();
} catch (Exception e) {
logger.warn("Failed to stop build '" + aBuild.getDisplayName() + "' :" + e.getMessage(), e);
}
aBuild.getActions(ParametersAction.class).forEach(action -> {
if (checkSuiteIdParamsExistAndEqual(action, suiteId, suiteRunId)) {
try {
aBuild.doStop();
} catch (Exception e) {
logger.warn("Failed to stop build '" + aBuild.getDisplayName() + "' :" + e.getMessage(), e);
}
});
}
}
});
}
});
} else {
Expand Down

0 comments on commit 270231e

Please sign in to comment.