-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 1.509.3 - 1.537
ProcStarter::envs() calls envs.clone(), but does not check envs variable for null. BTW, the variable may be null in the following case (see JENKINS-19506):
- There are several wrappers
- One of wrappers triggers remote call (Launcher::launch()) in setUp() or decorateLauncher() methods to setup variables (example: android-emulator) => it will make all other launchers to provide their environment variables
- One of other wrappers retrieves ProcStarter.envs() in setUp() or decorateLauncher()
- envs are empty for nested call => execution of other wrapper causes NPE inside core
- is duplicated by
-
JENKINS-19086 NullPointerException on ProcStarter.envs (Launcher.java:302)
-
- Closed
-
- is related to
-
JENKINS-19506 [integration] - android-plugin + custom-tools installation fails due to NPE in ProcStarter::envs()
-
- Closed
-
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/Launcher.java
http://jenkins-ci.org/commit/jenkins/ef943a3ee69529a9f41353f134043ed3363f12e0
Log:
[FIXED JENKINS-20559] - ProcStarter: Check for null before cloning of environment variables list
Resolves https://issues.jenkins-ci.org/browse/JENKINS-20559
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 https://issues.jenkins-ci.org/browse/JENKINS-19454
Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>