Fix logging null if called process fails
If some process executed by FS#readPipe ends in an error, the error stream is never set as errorMessage because FS#GobblerThread#waitForProcessCompletion always returned true. This caused LOG#warn to be called with null. Return false whenever FS#GobblerThread#waitForProcessCompletion fails. Bug: 538723 Change-Id: Ic9492bd688431d52c8665f7a2efec2989e95a4ce Signed-off-by: Cliffred van Velzen <cliffred@cliffred.nl> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
7b365b2faa
commit
0c8200b27b
|
@ -640,13 +640,16 @@ private boolean waitForProcessCompletion(IOException originalError) {
|
||||||
JGitText.get().commandClosedStderrButDidntExit,
|
JGitText.get().commandClosedStderrButDidntExit,
|
||||||
desc, PROCESS_EXIT_TIMEOUT), -1);
|
desc, PROCESS_EXIT_TIMEOUT), -1);
|
||||||
fail.set(true);
|
fail.set(true);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LOG.error(MessageFormat.format(
|
setError(originalError, MessageFormat.format(
|
||||||
JGitText.get().threadInterruptedWhileRunning, desc), e);
|
JGitText.get().threadInterruptedWhileRunning, desc), -1);
|
||||||
}
|
fail.set(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void setError(IOException e, String message, int exitCode) {
|
private void setError(IOException e, String message, int exitCode) {
|
||||||
exception.set(e);
|
exception.set(e);
|
||||||
|
|
Loading…
Reference in New Issue