Commits

Michael Heemskerk committed ca348aa

Prevent potential NPE in ExternalProcessImpl when arePumpsRunning is called after the process has already been wrapped up

Comments (0)

Files changed (1)

src/main/java/com/atlassian/utils/process/ExternalProcessImpl.java

     }
 
     private boolean arePumpsRunning() {
-        return outputPump.isRunning() || errorPump.isRunning()
-                || (inputPump != null && inputPump.isRunning());
+        return (outputPump != null && outputPump.isRunning()) ||
+                (errorPump != null && errorPump.isRunning()) ||
+                (inputPump != null && inputPump.isRunning());
     }
 
     /**