/** * {@inheritDoc} * <p> * Release the internal ObjectReader state. * * @since 4.0 */ @Override public void close() { if (reader != null && closeReader) { reader.close(); } }
@Override public void close() { ctx.close(); }
/** * {@inheritDoc} * <p> * Release any resources used by this walker's reader. * <p> * A walker that has been released can be used again, but may need to be * released after the subsequent usage. * * @since 4.0 */ @Override public void close() { if (closeReader) { reader.close(); } }
/** * {@inheritDoc} * <p> * Release any resources used by this walker's reader. * <p> * A walker that has been released can be used again, but may need to be * released after the subsequent usage. * * @since 4.0 */ @Override public void close() { if (closeReader) { reader.close(); } }
/** * {@inheritDoc} * <p> * Close resources opened by this store. * <p> * If {@link #get(String)} was called, closes the cached object reader * created by that method. Does not close the underlying repository. */ @Override public void close() { if (reader != null) { reader.close(); reader = null; commit = null; } }
/** * {@inheritDoc} * <p> * Release all resources used by this writer. */ @Override public void close() { reader.close(); if (myDeflater != null) { myDeflater.end(); myDeflater = null; } instances.remove(selfRef); }
@Override public void close() { delegate().close(); } }
/** {@inheritDoc} */ @Override public void close() { inserter.close(); reader.close(); for (RemotePack p : unfetchedPacks) { if (p.tmpIdx != null) p.tmpIdx.delete(); } for (WalkRemoteObjectDatabase r : remotes) r.close(); }
/** * Detect renames in the current file set. * * @param pm * report progress during the detection phases. * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s * representing all files that have been changed. * @throws java.io.IOException * file contents cannot be read from the repository. * @throws CancelledException * if rename detection was cancelled */ // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major // version public List<DiffEntry> compute(ProgressMonitor pm) throws IOException, CancelledException { if (!done) { try { return compute(objectReader, pm); } finally { objectReader.close(); } } return Collections.unmodifiableList(entries); }
/** * Dispose all internal state and invalidate all RevObject instances. * <p> * All RevObject (and thus RevCommit, etc.) instances previously acquired * from this RevWalk are invalidated by a dispose call. Applications must * not retain or use RevObject instances obtained prior to the dispose call. * All RevFlag instances are also invalidated, and must not be reused. */ public void dispose() { reader.close(); freeFlags = APP_FLAGS; delayFreeFlags = 0; retainOnReset = 0; carryFlags = UNINTERESTING; objects.clear(); roots.clear(); queue = new DateRevQueue(); pending = new StartGenerator(this); shallowCommitsInitialized = false; }
/** {@inheritDoc} */ @Override public Object call() throws Exception { or = block.templateReader.newReader(); try { DeltaWindow w; for (;;) { synchronized (this) { if (slices.isEmpty()) { break; } w = initWindow(slices.removeFirst()); } runWindow(w); } while ((w = block.stealWork(this)) != null) { runWindow(w); } } finally { block.pm.endWorker(); or.close(); or = null; } return 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); }
/** * Release the internal ObjectReader state. * * @since 4.0 */ @Override public void close() { if (reader != null && closeReader) { reader.close(); } }
/** * Performs the merge. * * @param base * base version of the note tree * @param ours * ours version of the note tree * @param theirs * theirs version of the note tree * @return merge result as a new NoteMap * @throws java.io.IOException */ public NoteMap merge(NoteMap base, NoteMap ours, NoteMap theirs) throws IOException { try { InMemoryNoteBucket mergedBucket = merge(0, base.getRoot(), ours.getRoot(), theirs.getRoot()); inserter.flush(); return NoteMap.newMap(mergedBucket, reader); } finally { reader.close(); inserter.close(); } }
if (flush) inserter.close(); reader.close();
reader.close(); endPhase(writeMonitor);
@Override public void close() { delegate().close(); } }
try { if (readCurs != null) readCurs.close(); } finally { readCurs = null;
ObjectId blobId = getObjectId( 0 ); ObjectReader objectReader = repository.newObjectReader(); ObjectLoader objectLoader = objectReader.open( blobId ); byte[] bytes = objectLoader.getBytes(); objectReader.close(); booloean binary = RawText.isBinary( bytes );
@Override public synchronized void close() { if(!closed) { closed = true; reader.close(); inserter.close(); repo.close(); } }