Skip to content

Commit

Permalink
Clean up open file handle in properties test
Browse files Browse the repository at this point in the history
  • Loading branch information
ghale committed Aug 22, 2019
1 parent 000a203 commit 8928278
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,12 @@ class WorkerExecutorLegacyApiIntegrationTest extends AbstractIntegrationSpec {
@Override
void run() {
Properties myProps = this.myProps;
myProps.store(outputFile.newWriter(), null)
def writer = outputFile.newWriter()
try {
myProps.store(writer, null)
} finally {
writer.close()
}
}
}
}
Expand Down

0 comments on commit 8928278

Please sign in to comment.