LargePackedWholeObject#openStream: Suppress resource warning

Eclipse warns that DfsReader should be managed by try-with-resource.

As described in 1484d6e (LargePackedWholeObject: Do not reuse released
inflater, 2018-04-26), the DfsReader is owned and closed by the
PackInputStream or explicitly closed in the try block's finally.

Suppress the warning with a brief explanatory comment.

Change-Id: I4187c935742072f3ee7f2d3551a6a98d40fc2702
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2018-04-27 08:27:30 +09:00
parent 1484d6eb0a
commit 20d431f79b
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ public byte[] getCachedBytes() throws LargeObjectException {
@Override
public ObjectStream openStream() throws MissingObjectException, IOException {
PackInputStream packIn;
// ctx is closed by PackInputStream, or explicitly in the finally block
@SuppressWarnings("resource")
DfsReader ctx = db.newReader();
try {
try {