Skip to content

Commit

Permalink
[java] fix bug for appium subclass that sets neither log file nor out… (
Browse files Browse the repository at this point in the history
#12696)

[java] fix bug for appium subclass that sets neither log file nor output stream
  • Loading branch information
titusfortner authored Sep 16, 2023
1 parent d78a8ec commit 6ff7f54
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,12 @@ protected Duration getDefaultTimeout() {
}

protected OutputStream getLogOutput() {
if (logOutputStream != null) {
return logOutputStream;
}
try {
return logOutputStream != null ? logOutputStream : new FileOutputStream(logFile);
File logFile = getLogFile();
return logFile == null ? ByteStreams.nullOutputStream() : new FileOutputStream(logFile);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 6ff7f54

Please sign in to comment.