Skip to content

Commit ba96994

Browse files
committed
check for null to make findbugs happy
1 parent bf5a330 commit ba96994

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/jenkinsci/plugins/docker/workflow/WithContainerStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ private static class Decorator extends LauncherDecorator implements Serializable
220220
this.envHost = Util.mapToEnv(envHost);
221221
this.ws = ws;
222222
this.toolName = toolName;
223-
this.hasEnv = dockerVersion.compareTo(new VersionNumber("1.13.0")) >= 0;
224-
this.hasWorkdir = dockerVersion.compareTo(new VersionNumber("17.12")) >= 0;
223+
this.hasEnv = dockerVersion != null && dockerVersion.compareTo(new VersionNumber("1.13.0")) >= 0;
224+
this.hasWorkdir = dockerVersion != null && dockerVersion.compareTo(new VersionNumber("17.12")) >= 0;
225225
}
226226

227227
@Override public Launcher decorate(final Launcher launcher, final Node node) {

0 commit comments

Comments
 (0)