Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into JENKINS-57116
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossg committed May 2, 2019
2 parents 1063e6b + c0a7ccb commit a8dfc40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.42</version>
<version>3.43</version>
</parent>

<groupId>org.csanchez.jenkins.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import hudson.model.AbstractDescribableImpl;
Expand Down Expand Up @@ -128,7 +127,7 @@ public class PodTemplate extends AbstractDescribableImpl<PodTemplate> implements
@Deprecated
private transient String yaml;

private List<String> yamls;
private List<String> yamls = new ArrayList<>();

@CheckForNull
private PodRetention podRetention = PodRetention.getPodTemplateDefault();
Expand Down Expand Up @@ -512,7 +511,7 @@ public void setNodeProperties(List<? extends NodeProperty<?>> properties) {
this.getNodeProperties().addAll(properties);
}

@NonNull
@Nonnull
public PodTemplateToolLocation getNodeProperties(){
if( this.nodeProperties == null)
this.nodeProperties = new PodTemplateToolLocation(this);
Expand Down Expand Up @@ -619,7 +618,7 @@ public List<ContainerTemplate> getContainers() {
*/
@Restricted(NoExternalUse.class) // Tests and UI
public String getYaml() {
return yamls.isEmpty() ? null : yamls.get(0);
return yamls == null || yamls.isEmpty() ? null : yamls.get(0);
}

@DataBoundSetter
Expand All @@ -632,6 +631,7 @@ public void setYaml(String yaml) {
}
}

@Nonnull
public List<String> getYamls() {
if (yamls ==null) {
return Collections.emptyList();
Expand Down

0 comments on commit a8dfc40

Please sign in to comment.