diff options
author | 2018-07-05 00:17:55 -0700 | |
---|---|---|
committer | 2018-07-05 00:19:21 -0700 | |
commit | 59f17d6e0550bf63a0b6ef182e2d63474e058ede (patch) | |
tree | 4cbec855321ead722363687b9983685e2b1bf648 /src/tools/android/java | |
parent | b40b7e715307de416b786c1d95f6cf3a6b69c9d3 (diff) |
Bazel server: ensure InputStreams are closed
Use try-with-resources to ensure InputStreams that
we open via FileSystem.InputStream(path) are
closed.
Eagerly closing InputStreams avoids hanging on to
file handles until the garbage collector finalizes
the InputStream, meaning Bazel on Windows (and
other processes) can delete or mutate these files.
Hopefully this avoids intermittent file deletion
errors that sometimes occur on Windows.
See https://github.com/bazelbuild/bazel/issues/5512
RELNOTES: none
PiperOrigin-RevId: 203338148
Diffstat (limited to 'src/tools/android/java')
0 files changed, 0 insertions, 0 deletions