diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2017-11-16 02:14:20 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-16 02:16:16 -0800 |
commit | 93332281ed71a58e30db25b1fb906c014c022c31 (patch) | |
tree | a5d3b827dc09ea16d64bd668edc9af317409cb62 /third_party/ijar | |
parent | 85e4896db911f77f1223f080c540b8cbf133f873 (diff) |
buildjar: close streams
Use try-with-resources to close all streams.
I hope this will fix the spurious file deletion
failures on Windows, where the persistent
JavaBuilder worker cannot delete outputs from
previous builds because, supposedly, they are
still open, because a stale object that's ready
to be GC'd hasn't yet been actually GC'd.
Change-Id: Ia57b8bd0ba1b6ee0691d34467c92e86e35d4d71d
PiperOrigin-RevId: 175941520
Diffstat (limited to 'third_party/ijar')
-rwxr-xr-x | third_party/ijar/test/ijar_test.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/ijar/test/ijar_test.sh b/third_party/ijar/test/ijar_test.sh index 5279f15f84..0b9a92fb2d 100755 --- a/third_party/ijar/test/ijar_test.sh +++ b/third_party/ijar/test/ijar_test.sh @@ -41,7 +41,7 @@ shift source ${DIR}/testenv.sh || { echo "testenv.sh not found!" >&2; exit 1; } function cleanup() { - rm -fr "${TEST_TMPDIR:-sentinel}"/* + rm -fr "$TEST_TMPDIR"/* } trap cleanup EXIT |