Change-Id: I035aa89cdbf235992f41e752f49d735be4e5df0a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
ObjectLoader lo = reader.open(ours.getData());
ObjectLoader lt = reader.open(theirs.getData());
- UnionInputStream union = new UnionInputStream(lo.openStream(),
- lt.openStream());
- try {
+ try (UnionInputStream union = new UnionInputStream(lo.openStream(),
+ lt.openStream())) {
ObjectId noteData = inserter.insert(Constants.OBJ_BLOB,
lo.getSize() + lt.getSize(), union);
return new Note(ours, noteData);
- } finally {
- union.close();
}
}
}