Skip to content

Commit

Permalink
No point checking for null, the constructor handles the null the same…
Browse files Browse the repository at this point in the history
… as the default constructor which just passes null directly into this constructor anyway. So if there's a value we get what we want, and if there's not, we still get what we want. Simpler is better.
  • Loading branch information
fredcooke committed May 13, 2021
1 parent fd5f201 commit fd64777
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ public boolean start() throws Exception {
String name = String.format(NAME_FORMAT, stepName, randString);
String namespace = checkNamespace(cloud, podTemplateContext);

if (step.getId() != null) {
newTemplate = new PodTemplate(step.getId());
} else {
newTemplate = new PodTemplate();
}

newTemplate = new PodTemplate(step.getId());
newTemplate.setName(name);
newTemplate.setNamespace(namespace);

Expand Down

0 comments on commit fd64777

Please sign in to comment.