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
…put stream
  • Loading branch information
titusfortner committed Sep 16, 2023
1 parent 14e43b1 commit 4ef79bd
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 4ef79bd

Please sign in to comment.