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 <>
  • Loading branch information
oleg-nenashev committed Jun 1, 2014
1 parent a865a52 commit ef943a3ee69529a9f41353f134043ed3363f12e0
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 ef943a3

Please sign in to comment.