Skip to content
Browse files
[FIXED JENKINS-20559] - ProcStarter: Check for null before cloning of…
… environment variables list

BTW, I also need to add some tests to "Test Harness" in order to improve coverage of nested operations.
These test require a fix for

Signed-off-by: Oleg Nenashev <>
(cherry picked from commit ef943a3)
  • Loading branch information
oleg-nenashev authored and olivergondza committed Jul 2, 2014
1 parent eedf51e commit 1273668ba3b47fd344405ba4c49ec5a83ea9b508
Showing with 6 additions and 1 deletion.
  1. +6 −1 core/src/main/java/hudson/
@@ -300,8 +300,13 @@ public ProcStarter envs(String... overrides) {
return this;

* Gets a list of environment variables to be set.
* Returns an empty array if envs field has not been initialized.
* @return If initialized, returns a copy of internal envs array. Otherwise - a new empty array.
public String[] envs() {
return envs.clone();
return envs != null ? envs.clone() : new String[0];


0 comments on commit 1273668

Please sign in to comment.