From 93332281ed71a58e30db25b1fb906c014c022c31 Mon Sep 17 00:00:00 2001 From: Laszlo Csomor Date: Thu, 16 Nov 2017 02:14:20 -0800 Subject: 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 --- third_party/ijar/test/ijar_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/ijar') 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 -- cgit v1.2.3