if (stage.getBranches().size() == 1) { ModelASTBranch branch = stage.getBranches().get(0); body.setCode(handleBranch(branch)); } else { MapExpression newParallelMap = new MapExpression(); for (ModelASTBranch b : stage.getBranches()) { newParallelMap.addMapEntryExpression(constX(b.getName()), closureX(handleBranch(b)));
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getAgent() != null ? getAgent().hashCode() : 0); result = 31 * result + (getBranches() != null ? getBranches().hashCode() : 0); result = 31 * result + (getWhen() != null ? getWhen().hashCode() : 0); result = 31 * result + (getPost() != null ? getPost().hashCode() : 0); result = 31 * result + (getTools() != null ? getTools().hashCode() : 0); result = 31 * result + (getEnvironment() != null ? getEnvironment().hashCode() : 0); result = 31 * result + (getFailFast() != null ? getFailFast().hashCode() : 0); result = 31 * result + (getParallel() != null ? getParallel().hashCode() : 0); return result; } }
return false; return getBranches() != null ? getBranches().equals(that.getBranches()) : that.getBranches() == null;
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getAgent() != null ? getAgent().hashCode() : 0); result = 31 * result + (getWhen() != null ? getWhen().hashCode() : 0); result = 31 * result + (getPost() != null ? getPost().hashCode() : 0); result = 31 * result + (getTools() != null ? getTools().hashCode() : 0); result = 31 * result + (getEnvironment() != null ? getEnvironment().hashCode() : 0); result = 31 * result + (getStages() != null ? getStages().hashCode() : 0); result = 31 * result + (getBranches() != null ? getBranches().hashCode() : 0); result = 31 * result + (getFailFast() != null ? getFailFast().hashCode() : 0); result = 31 * result + (getParallel() != null ? getParallel().hashCode() : 0); result = 31 * result + (getOptions() != null ? getOptions().hashCode() : 0); result = 31 * result + (getInput() != null ? getInput().hashCode() : 0); result = 31 * result + (getParallelContent() != null ? getParallelContent().hashCode() : 0); return result; } }
return false; return getBranches() != null ? getBranches().equals(that.getBranches()) : that.getBranches() == null;
assertNotNull(stage); assertEquals(1, stage.getBranches().size()); ModelASTBranch firstBranch = branchForName("default", stage.getBranches()); assertNotNull(firstBranch); assertNull(firstBranch.getSourceLocation());
assertNotNull(stage); assertEquals(2, stage.getBranches().size()); ModelASTBranch firstBranch = branchForName("first", stage.getBranches()); assertNotNull(firstBranch); assertNull(firstBranch.getSourceLocation()); assertNull(val.getSourceLocation()); ModelASTBranch secondBranch = branchForName("second", stage.getBranches()); assertNotNull(secondBranch); assertNull(secondBranch.getSourceLocation());