Skip to content

Commit

Permalink
fix(stage): npe no longer thrown when stage name is not present (#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
emjburns committed Feb 16, 2018
1 parent d7fd7b7 commit d20be33
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public PipelineBuilder withStage(String type) {
public PipelineBuilder withStages(List<Map<String, Object>> stages) {
stages.forEach(it -> {
String type = it.remove("type").toString();
String name = it.remove("name").toString();
String name = it.containsKey("name")? it.remove("name").toString() : null;
withStage(type, name != null ? name : type, it);
});
return this;
Expand Down

0 comments on commit d20be33

Please sign in to comment.