Skip to content

Commit

Permalink
[java] Fixing file stream leaking in legacy Firefox driver
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 13, 2019
1 parent f78cbf9 commit 7543249
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ private XpiDriverService(
} else if ("/dev/null".equals(firefoxLogFile)) {
sendOutputTo(ByteStreams.nullOutputStream());
} else {
// TODO: This stream is leaked.
sendOutputTo(new FileOutputStream(firefoxLogFile));
}
} else {
Expand Down Expand Up @@ -239,16 +238,9 @@ protected void waitUntilAvailable() throws MalformedURLException {

@Override
public void stop() {
lock.lock();
try {
if (process != null) {
process.destroy();
}
profile.cleanTemporaryModel();
profile.clean(profileDir);
} finally {
lock.unlock();
}
super.stop();
profile.cleanTemporaryModel();
profile.clean(profileDir);
}

private void addWebDriverExtension(FirefoxProfile profile) {
Expand Down

0 comments on commit 7543249

Please sign in to comment.