Skip to content

Commit

Permalink
defect #832075: Test suite builds in Jenkins build queue cannot be st…
Browse files Browse the repository at this point in the history
…opped from Octane - remove redundant stream API call
  • Loading branch information
stekel committed Apr 28, 2019
1 parent d3e1c44 commit 4911c84
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public void cancelBuild(Cause cause, ParametersAction parametersAction) {
if (job instanceof AbstractProject) {
AbstractProject project = (AbstractProject) job;
Queue queue = Jenkins.get().getQueue();
queue.getItems(project).stream().forEach(item -> {
item.getActions(ParametersAction.class).stream().forEach(action -> {
queue.getItems(project).forEach(item -> {
item.getActions(ParametersAction.class).forEach(action -> {
if (action.getParameter("suiteId").getValue().equals(parametersAction.getParameter("suiteId").getValue())
&& action.getParameter("suiteRunId").getValue().equals(parametersAction.getParameter("suiteRunId").getValue())) {
try {
Expand All @@ -93,10 +93,10 @@ public void cancelBuild(Cause cause, ParametersAction parametersAction) {
});
});

project.getBuilds().stream().forEach(build -> {
project.getBuilds().forEach(build -> {
if (build instanceof AbstractBuild) {
AbstractBuild abuild = (AbstractBuild) build;
abuild.getActions(ParametersAction.class).stream().forEach(action -> {
abuild.getActions(ParametersAction.class).forEach(action -> {
if (action.getParameter("suiteId").getValue().equals(parametersAction.getParameter("suiteId").getValue())
&& action.getParameter("suiteRunId").getValue().equals(parametersAction.getParameter("suiteRunId").getValue())) {
try {
Expand Down

0 comments on commit 4911c84

Please sign in to comment.