PackWriter is auto-closeable and should be opened in try-with-resource,
but this is not possible since the variable is being referenced in the
finally block before being explicitly closed there.
Suppress the warning and add an explanatory comment.
Change-Id: I161923f35142132234fd951c0146d3cb30920b7b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
PackConfig cfg = packConfig;
if (cfg == null)
cfg = new PackConfig(db);
+ @SuppressWarnings("resource") // PackWriter is referenced in the finally
+ // block, and is closed there
final PackWriter pw = new PackWriter(cfg, walk.getObjectReader(),
accumulator);
try {