Browse Source

Replace use of deprecated release() in BasePackFetchConnection

Change-Id: If90a6cca9a2ae80474f5ad023cb2a0a8905010be
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.1
Matthias Sohn 10 years ago
parent
commit
b61be2cf3e
  1. 7
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java

7
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java

@ -377,7 +377,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
@Override
public void close() {
if (walk != null)
walk.release();
walk.close();
super.close();
}
@ -753,16 +753,13 @@ public abstract class BasePackFetchConnection extends BasePackConnection
input = new SideBandInputStream(input, monitor, getMessageWriter(),
outputStream);
ObjectInserter ins = local.newObjectInserter();
try {
try (ObjectInserter ins = local.newObjectInserter()) {
PackParser parser = ins.newPackParser(input);
parser.setAllowThin(thinPack);
parser.setObjectChecker(transport.getObjectChecker());
parser.setLockMessage(lockMessage);
packLock = parser.parse(monitor);
ins.flush();
} finally {
ins.release();
}
}

Loading…
Cancel
Save