/** {@inheritDoc} */ @Override public void close() { if (rw != null) { rw.close(); rw = null; } }
/** {@inheritDoc} */ @Override protected void unlock() { batch = null; if (rw != null) { rw.close(); rw = null; } }
/** * {@inheritDoc} * <p> * Release the current blame session. * * @since 4.0 */ @Override public void close() { revPool.close(); queue = null; outCandidate = null; outRegion = null; }
/** {@inheritDoc} */ @Override public void close() { if (walk != null) walk.close(); super.close(); }
private void initRevWalk() { if (rw != null) { rw.close(); } rw = new RevWalk(repo); rw.setRetainBody(false); }
/** * Release any resources used by this object. * * @throws java.io.IOException * the pack could not be unlocked. */ protected void release() throws IOException { walk.close(); unlockPack(); timeoutIn = null; rawIn = null; rawOut = null; msgOut = null; pckIn = null; pckOut = null; refs = null; // Keep the capabilities. If responses are sent after this release // we need to remember at least whether sideband communication has to be // used commands = null; if (timer != null) { try { timer.terminate(); } finally { timer = null; } } }
/** * Set the inserter this merger will use to create objects. * <p> * If an inserter was already set on this instance (such as by a prior set, * or a prior call to {@link #getObjectInserter()}), the prior inserter as * well as the in-progress walk will be released. * * @param oi * the inserter instance to use. Must be associated with the * repository instance returned by {@link #getRepository()} (if a * repository was provided). Will be closed at the conclusion of * {@code merge}, unless {@code flush} is false. */ public void setObjectInserter(ObjectInserter oi) { walk.close(); reader.close(); inserter.close(); inserter = oi; reader = oi.newReader(); walk = new RevWalk(reader); }
private void initRevPool(boolean reverse) { if (queue != null) throw new IllegalStateException(); if (revPool != null) revPool.close(); if (reverse) revPool = new ReverseWalk(getRepository()); else revPool = new RevWalk(getRepository()); SEEN = revPool.newFlag("SEEN"); //$NON-NLS-1$ reader = revPool.getObjectReader(); treeWalk = new TreeWalk(reader); treeWalk.setRecursive(true); }
throw new JGitInternalException(e.getMessage(), e); } finally { walk.close();
} finally { setCallable(false); w.close();
/** * Release the current blame session. * * @since 4.0 */ @Override public void close() { revPool.close(); queue = null; outCandidate = null; outRegion = null; }
@Override protected void unlock() { batch = null; if (rw != null) { rw.close(); rw = null; } }
walk.close(); if (timer != null) { try {
/** {@inheritDoc} */ @Override public void close() { if (walk != null) walk.close(); super.close(); }
walk.close(); monitor.endTask();
@Override protected void advertise(HttpServletRequest req, PacketLineOutRefAdvertiser pck) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = (ReceivePack) req.getAttribute(ATTRIBUTE_HANDLER); try { rp.sendAdvertisedRefs(pck); } finally { rp.getRevWalk().close(); } } }
walk.close(); } finally { monitor.endTask();
private void initRevWalk() { if (rw != null) { rw.close(); } rw = new RevWalk(repo); rw.setRetainBody(false); }
private RevTree extractTag(String tagName) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevWalk walk = new RevWalk(repository); Map<String, Ref> tags = repository.getTags(); Ref tag = tags.get(tagName); RevTree target = walk.parseTree(tag.getObjectId()); walk.close(); return target; }