In #writeTo, the TemporaryBuffer can't be opened in try-with-resource
because it's referenced in the finally block. Instead it is explicitly
closed within the try block. Suppress the warning with an explanatory
comment.
Change-Id: I02009f77f9630d5d55afc34eb86d304ff103b8b0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
}
if (writeTree) {
+ @SuppressWarnings("resource") // Explicitly closed in try block, and
+ // destroyed in finally
TemporaryBuffer bb = new TemporaryBuffer.LocalFile(dir, 5 << 20);
try {
tree.write(tmp, bb);