Bump JGit to v4.0.0.201506090130-r
This JGit version includes the bugfix [1] which is an attempt to fix the "Cannot read project" issue in Gerrit, as discussed in [2] and [3]. This version of JGit also removes the 'release()' method in many interfaces/classes in favor or the implementing the AutoCloseable interface. In stable-2.10 we just replace all usages of the release() method with the close() method. Refactoring the code to make use of the AutoCloseable in stable-2.10 would be a larger change which wouldn't justify itself as we don't expect any major development in stable-2.10 and the usage of AutoCloseable in the master branch is already done. [1] https://git.eclipse.org/r/48288 [2] https://groups.google.com/forum/#!topic/repo-discuss/ZeGWPyyJlrM [3] https://groups.google.com/forum/#!topic/repo-discuss/CYYoHfDxCfA Change-Id: Ie540296238e3bbaf453c9e29426825431e15d423 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
@@ -184,7 +184,7 @@ public class GitUtil {
|
|||||||
return ChangeIdUtil.computeChangeId(null, null, i, i, msg);
|
return ChangeIdUtil.computeChangeId(null, null, i, i, msg);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -292,7 +292,7 @@ public class SubmitOnPushIT extends AbstractDaemonTest {
|
|||||||
assertEquals(admin.email, c.getAuthorIdent().getEmailAddress());
|
assertEquals(admin.email, c.getAuthorIdent().getEmailAddress());
|
||||||
assertEquals(admin.email, c.getCommitterIdent().getEmailAddress());
|
assertEquals(admin.email, c.getCommitterIdent().getEmailAddress());
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
r.close();
|
r.close();
|
||||||
@@ -310,7 +310,7 @@ public class SubmitOnPushIT extends AbstractDaemonTest {
|
|||||||
assertEquals(admin.email, c.getAuthorIdent().getEmailAddress());
|
assertEquals(admin.email, c.getAuthorIdent().getEmailAddress());
|
||||||
assertEquals(serverIdent.getEmailAddress(), c.getCommitterIdent().getEmailAddress());
|
assertEquals(serverIdent.getEmailAddress(), c.getCommitterIdent().getEmailAddress());
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
r.close();
|
r.close();
|
||||||
|
@@ -265,7 +265,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
|||||||
repo.getRef("refs/heads/master").getObjectId()));
|
repo.getRef("refs/heads/master").getObjectId()));
|
||||||
return Lists.newArrayList(rw);
|
return Lists.newArrayList(rw);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
@@ -278,7 +278,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
|||||||
try {
|
try {
|
||||||
return rw.parseCommit(repo.getRef(name).getObjectId());
|
return rw.parseCommit(repo.getRef(name).getObjectId());
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
@@ -300,7 +300,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
|||||||
ObjectId newTreeId = repo.resolve("refs/heads/master^{tree}");
|
ObjectId newTreeId = repo.resolve("refs/heads/master^{tree}");
|
||||||
return getLatestDiff(repo, oldTreeId, newTreeId);
|
return getLatestDiff(repo, oldTreeId, newTreeId);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -252,8 +252,8 @@ public class CreateProjectIT extends AbstractDaemonTest {
|
|||||||
tw.reset();
|
tw.reset();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
tw.release();
|
tw.close();
|
||||||
rw.release();
|
rw.close();
|
||||||
repo.close();
|
repo.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -209,7 +209,7 @@ public class CatServlet extends HttpServlet {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
getServletContext().log("Cannot read repository", e);
|
getServletContext().log("Cannot read repository", e);
|
||||||
|
@@ -136,15 +136,15 @@ public class AllProjectsConfig extends VersionedMetaData {
|
|||||||
updateRef(repo, ident, newRevision, "commit: " + msg);
|
updateRef(repo, ident, newRevision, "commit: " + msg);
|
||||||
revision = newRevision;
|
revision = newRevision;
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (inserter != null) {
|
if (inserter != null) {
|
||||||
inserter.release();
|
inserter.close();
|
||||||
inserter = null;
|
inserter = null;
|
||||||
}
|
}
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
reader.release();
|
reader.close();
|
||||||
reader = null;
|
reader = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -300,7 +300,7 @@ public class ChangeUtil {
|
|||||||
oi.flush();
|
oi.flush();
|
||||||
revertCommit = revWalk.parseCommit(id);
|
revertCommit = revWalk.parseCommit(id);
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
RefControl refControl = ctl.getRefControl();
|
RefControl refControl = ctl.getRefControl();
|
||||||
@@ -364,7 +364,7 @@ public class ChangeUtil {
|
|||||||
|
|
||||||
return change.getId();
|
return change.getId();
|
||||||
} finally {
|
} finally {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
@@ -423,7 +423,7 @@ public class ChangeUtil {
|
|||||||
oi.flush();
|
oi.flush();
|
||||||
newCommit = revWalk.parseCommit(id);
|
newCommit = revWalk.parseCommit(id);
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
PatchSet.Id id = nextPatchSetId(git, change.currentPatchSetId());
|
PatchSet.Id id = nextPatchSetId(git, change.currentPatchSetId());
|
||||||
@@ -446,7 +446,7 @@ public class ChangeUtil {
|
|||||||
|
|
||||||
return change.getId();
|
return change.getId();
|
||||||
} finally {
|
} finally {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
|
@@ -228,7 +228,7 @@ public class ChangeKindCacheImpl implements ChangeKindCache {
|
|||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
key.repo = null;
|
key.repo = null;
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -154,7 +154,7 @@ public class CherryPickChange {
|
|||||||
mergeUtilFactory.create(projectState).createCherryPickFromCommit(git, oi, mergeTip,
|
mergeUtilFactory.create(projectState).createCherryPickFromCommit(git, oi, mergeTip,
|
||||||
commitToCherryPick, committerIdent, commitMessage, revWalk);
|
commitToCherryPick, committerIdent, commitMessage, revWalk);
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cherryPickCommit == null) {
|
if (cherryPickCommit == null) {
|
||||||
@@ -192,7 +192,7 @@ public class CherryPickChange {
|
|||||||
cherryPickCommit, refControl, identifiedUser);
|
cherryPickCommit, refControl, identifiedUser);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
|
@@ -184,7 +184,7 @@ public class CreateChange implements
|
|||||||
|
|
||||||
return Response.created(json.format(change.getId()));
|
return Response.created(json.format(change.getId()));
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
@@ -250,7 +250,7 @@ public class CreateChange implements
|
|||||||
commit.setMessage(commitMessage);
|
commit.setMessage(commitMessage);
|
||||||
emptyCommit = rw.parseCommit(insert(oi, commit));
|
emptyCommit = rw.parseCommit(insert(oi, commit));
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
return emptyCommit;
|
return emptyCommit;
|
||||||
}
|
}
|
||||||
|
@@ -274,7 +274,7 @@ public class Files implements ChildCollection<RevisionResource, FileResource> {
|
|||||||
db.get().accountPatchReviews().insert(inserts);
|
db.get().accountPatchReviews().insert(inserts);
|
||||||
return pathList;
|
return pathList;
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
|
@@ -126,7 +126,7 @@ public class GetArchive implements RestReadView<RevisionResource> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
rw.release();
|
rw.close();
|
||||||
repo.close();
|
repo.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -139,7 +139,7 @@ public class GetArchive implements RestReadView<RevisionResource> {
|
|||||||
return bin;
|
return bin;
|
||||||
} finally {
|
} finally {
|
||||||
if (close) {
|
if (close) {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
@@ -73,10 +73,10 @@ public class GetContent implements RestReadView<FileResource> {
|
|||||||
};
|
};
|
||||||
return result.setContentLength(object.getSize()).base64();
|
return result.setContentLength(object.getSize()).base64();
|
||||||
} finally {
|
} finally {
|
||||||
tw.release();
|
tw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -102,7 +102,7 @@ public class GetPatch implements RestReadView<RevisionResource> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
rw.release();
|
rw.close();
|
||||||
repo.close();
|
repo.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -123,7 +123,7 @@ public class GetPatch implements RestReadView<RevisionResource> {
|
|||||||
return bin;
|
return bin;
|
||||||
} finally {
|
} finally {
|
||||||
if (close) {
|
if (close) {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
@@ -83,7 +83,7 @@ public class GetRelated implements RestReadView<RevisionResource> {
|
|||||||
info.changes = walk(rsrc, rw, ref);
|
info.changes = walk(rsrc, rw, ref);
|
||||||
return info;
|
return info;
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
|
@@ -71,7 +71,7 @@ class IncludedIn implements RestReadView<ChangeResource> {
|
|||||||
}
|
}
|
||||||
return new IncludedInInfo(IncludedInResolver.resolve(r, rw, rev));
|
return new IncludedInInfo(IncludedInResolver.resolve(r, rw, rev));
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
r.close();
|
r.close();
|
||||||
|
@@ -245,7 +245,7 @@ public class Mergeable implements RestReadView<RevisionResource> {
|
|||||||
"Cannot merge test change %d", change.getId().get()), e);
|
"Cannot merge test change %d", change.getId().get()), e);
|
||||||
return false;
|
return false;
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -142,10 +142,10 @@ public class RebaseChange {
|
|||||||
throw new IOException(e.getMessage());
|
throw new IOException(e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
if (inserter != null) {
|
if (inserter != null) {
|
||||||
inserter.release();
|
inserter.close();
|
||||||
}
|
}
|
||||||
if (rw != null) {
|
if (rw != null) {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
if (git != null) {
|
if (git != null) {
|
||||||
git.close();
|
git.close();
|
||||||
|
@@ -69,7 +69,7 @@ public class BanCommit {
|
|||||||
RevCommit map = rw.parseCommit(ref.getObjectId());
|
RevCommit map = rw.parseCommit(ref.getObjectId());
|
||||||
return NoteMap.read(rw.getObjectReader(), map);
|
return NoteMap.read(rw.getObjectReader(), map);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} catch (IOException badMap) {
|
} catch (IOException badMap) {
|
||||||
throw new IOException("Cannot load " + RefNames.REFS_REJECT_COMMITS,
|
throw new IOException("Cannot load " + RefNames.REFS_REJECT_COMMITS,
|
||||||
@@ -138,8 +138,8 @@ public class BanCommit {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
} finally {
|
} finally {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
inserter.release();
|
inserter.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -304,10 +304,10 @@ public class MergeOp {
|
|||||||
throw new MergeException("Cannot query the database", e);
|
throw new MergeException("Cannot query the database", e);
|
||||||
} finally {
|
} finally {
|
||||||
if (inserter != null) {
|
if (inserter != null) {
|
||||||
inserter.release();
|
inserter.close();
|
||||||
}
|
}
|
||||||
if (rw != null) {
|
if (rw != null) {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
if (repo != null) {
|
if (repo != null) {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -671,7 +671,7 @@ public class MergeUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void release() {
|
public void close() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return (ThreeWayMerger) m;
|
return (ThreeWayMerger) m;
|
||||||
|
@@ -153,8 +153,8 @@ public class NotesBranchUtil {
|
|||||||
}
|
}
|
||||||
updateRef(notesBranch);
|
updateRef(notesBranch);
|
||||||
} finally {
|
} finally {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -383,7 +383,7 @@ public class SubmoduleOp {
|
|||||||
+ subscriber.get(), e);
|
+ subscriber.get(), e);
|
||||||
} finally {
|
} finally {
|
||||||
if (recRw != null) {
|
if (recRw != null) {
|
||||||
recRw.release();
|
recRw.close();
|
||||||
}
|
}
|
||||||
if (pdb != null) {
|
if (pdb != null) {
|
||||||
pdb.close();
|
pdb.close();
|
||||||
@@ -403,7 +403,7 @@ public class SubmoduleOp {
|
|||||||
b.finish();
|
b.finish();
|
||||||
return dc;
|
return dc;
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -147,7 +147,7 @@ class TagSet {
|
|||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (rw != null) {
|
if (rw != null) {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,7 +189,7 @@ class TagSet {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.warn("Error building tags for repository " + projectName, e);
|
log.warn("Error building tags for repository " + projectName, e);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -117,7 +117,7 @@ public abstract class VersionedMetaData {
|
|||||||
revision = id != null ? new RevWalk(reader).parseCommit(id) : null;
|
revision = id != null ? new RevWalk(reader).parseCommit(id) : null;
|
||||||
onLoad();
|
onLoad();
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
reader = null;
|
reader = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -306,12 +306,12 @@ public abstract class VersionedMetaData {
|
|||||||
newTree = null;
|
newTree = null;
|
||||||
|
|
||||||
if (inserter != null) {
|
if (inserter != null) {
|
||||||
inserter.release();
|
inserter.close();
|
||||||
inserter = null;
|
inserter = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
reader.release();
|
reader.close();
|
||||||
reader = null;
|
reader = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -319,7 +319,7 @@ public class ChangeBatchIndexer {
|
|||||||
getPathsAndIndex(id);
|
getPathsAndIndex(id);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -353,7 +353,7 @@ public class ChangeBatchIndexer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
df.release();
|
df.close();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
fail("Failed to index commit " + b.name(), false, e);
|
fail("Failed to index commit " + b.name(), false, e);
|
||||||
@@ -398,7 +398,7 @@ public class ChangeBatchIndexer {
|
|||||||
oi.flush();
|
oi.flush();
|
||||||
return id;
|
return id;
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -407,7 +407,7 @@ public abstract class ChangeEmail extends NotificationEmail {
|
|||||||
log.error("Cannot format patch", e);
|
log.error("Cannot format patch", e);
|
||||||
return "";
|
return "";
|
||||||
} finally {
|
} finally {
|
||||||
fmt.release();
|
fmt.close();
|
||||||
git.close();
|
git.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@ public class PatchSetNotificationSender {
|
|||||||
commit = revWalk.parseCommit(ObjectId.fromString(
|
commit = revWalk.parseCommit(ObjectId.fromString(
|
||||||
updatedPatchSet.getRevision().get()));
|
updatedPatchSet.getRevision().get()));
|
||||||
} finally {
|
} finally {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
}
|
}
|
||||||
final PatchSetInfo info = patchSetInfoFactory.get(commit, updatedPatchSet.getId());
|
final PatchSetInfo info = patchSetInfoFactory.get(commit, updatedPatchSet.getId());
|
||||||
final List<FooterLine> footerLines = commit.getFooterLines();
|
final List<FooterLine> footerLines = commit.getFooterLines();
|
||||||
|
@@ -575,7 +575,7 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
|
|||||||
// TODO(yyonas): figure out how to handle this exception
|
// TODO(yyonas): figure out how to handle this exception
|
||||||
throw new IOException(e1);
|
throw new IOException(e1);
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ public class PatchFile {
|
|||||||
bTree = bCommit.getTree();
|
bTree = bCommit.getTree();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -189,7 +189,7 @@ public class PatchListLoader extends CacheLoader<PatchListKey, PatchList> {
|
|||||||
return new PatchList(a, b, againstParent,
|
return new PatchList(a, b, againstParent,
|
||||||
entries.toArray(new PatchListEntry[entries.size()]));
|
entries.toArray(new PatchListEntry[entries.size()]));
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +342,7 @@ public class PatchListLoader extends CacheLoader<PatchListKey, PatchList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void release() {
|
public void close() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ public class PatchListLoader extends CacheLoader<PatchListKey, PatchList> {
|
|||||||
|
|
||||||
return rw.lookupTree(treeId);
|
return rw.lookupTree(treeId);
|
||||||
} finally {
|
} finally {
|
||||||
ins.release();
|
ins.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +465,7 @@ public class PatchListLoader extends CacheLoader<PatchListKey, PatchList> {
|
|||||||
oi.flush();
|
oi.flush();
|
||||||
return id;
|
return id;
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -119,7 +119,7 @@ class PatchScriptBuilder {
|
|||||||
try {
|
try {
|
||||||
return build(content, comments, history);
|
return build(content, comments, history);
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -94,7 +94,7 @@ public class PatchSetInfoFactory {
|
|||||||
info.setParents(toParentInfos(src.getParents(), rw));
|
info.setParents(toParentInfos(src.getParents(), rw));
|
||||||
return info;
|
return info;
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new PatchSetInfoNotAvailableException(e);
|
throw new PatchSetInfoNotAvailableException(e);
|
||||||
|
@@ -75,7 +75,7 @@ public class CommitsCollection implements
|
|||||||
} catch (MissingObjectException | IncorrectObjectTypeException e) {
|
} catch (MissingObjectException | IncorrectObjectTypeException e) {
|
||||||
throw new ResourceNotFoundException(id);
|
throw new ResourceNotFoundException(id);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -71,7 +71,7 @@ public class GetHead implements RestReadView<ProjectResource> {
|
|||||||
}
|
}
|
||||||
throw new AuthException("not allowed to see HEAD");
|
throw new AuthException("not allowed to see HEAD");
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new ResourceNotFoundException(Constants.HEAD);
|
throw new ResourceNotFoundException(Constants.HEAD);
|
||||||
|
@@ -100,7 +100,7 @@ class ListDashboards implements RestReadView<ProjectResource> {
|
|||||||
}
|
}
|
||||||
return all;
|
return all;
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
git.close();
|
git.close();
|
||||||
@@ -134,7 +134,7 @@ class ListDashboards implements RestReadView<ProjectResource> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
tw.release();
|
tw.close();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -300,7 +300,7 @@ public class PerformCreateProject {
|
|||||||
+ createProjectArgs.getProjectName(), e);
|
+ createProjectArgs.getProjectName(), e);
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -466,7 +466,7 @@ public class ChangeData {
|
|||||||
commitMessage = c.getFullMessage();
|
commitMessage = c.getFullMessage();
|
||||||
commitFooters = c.getFooterLines();
|
commitFooters = c.getFooterLines();
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -138,7 +138,7 @@ class ConflictsPredicate extends OrPredicate<ChangeData> {
|
|||||||
} catch (NoSuchProjectException e) {
|
} catch (NoSuchProjectException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -109,7 +109,7 @@ public abstract class RevWalkPredicate extends OperatorPredicate<ChangeData> {
|
|||||||
try {
|
try {
|
||||||
return match(repo, rw, args);
|
return match(repo, rw, args);
|
||||||
} finally {
|
} finally {
|
||||||
rw.release();
|
rw.close();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
repo.close();
|
repo.close();
|
||||||
|
@@ -130,7 +130,7 @@ public class PRED_commit_edits_2 extends Predicate.P2 {
|
|||||||
} catch (IOException err) {
|
} catch (IOException err) {
|
||||||
throw new JavaException(this, 1, err);
|
throw new JavaException(this, 1, err);
|
||||||
} finally {
|
} finally {
|
||||||
reader.release();
|
reader.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
return engine.fail();
|
return engine.fail();
|
||||||
|
@@ -127,7 +127,7 @@ public class IncludedInResolverTest extends RepositoryTestCase {
|
|||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
revWalk.release();
|
revWalk.close();
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -218,7 +218,7 @@ public class ChangeNotesTest {
|
|||||||
assertEquals(author.getWhen(), committer.getWhen());
|
assertEquals(author.getWhen(), committer.getWhen());
|
||||||
assertEquals(author.getTimeZone(), committer.getTimeZone());
|
assertEquals(author.getTimeZone(), committer.getTimeZone());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ public class ChangeNotesTest {
|
|||||||
+ "Patch-set: 1\n",
|
+ "Patch-set: 1\n",
|
||||||
commit.getFullMessage());
|
commit.getFullMessage());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ public class ChangeNotesTest {
|
|||||||
+ "Label: -Code-Review\n",
|
+ "Label: -Code-Review\n",
|
||||||
commit.getFullMessage());
|
commit.getFullMessage());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ public class ChangeNotesTest {
|
|||||||
assertEquals(author.getWhen(), committer.getWhen());
|
assertEquals(author.getWhen(), committer.getWhen());
|
||||||
assertEquals(author.getTimeZone(), committer.getTimeZone());
|
assertEquals(author.getTimeZone(), committer.getTimeZone());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ public class ChangeNotesTest {
|
|||||||
+ "Submitted-with: RULE_ERROR Problem with patch set: 1\n",
|
+ "Submitted-with: RULE_ERROR Problem with patch set: 1\n",
|
||||||
commit.getFullMessage());
|
commit.getFullMessage());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -717,7 +717,7 @@ public class ChangeNotesTest {
|
|||||||
+ "Reviewer: Change Owner <1@gerrit>\n",
|
+ "Reviewer: Change Owner <1@gerrit>\n",
|
||||||
commit.getFullMessage());
|
commit.getFullMessage());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeNotes notes = newNotes(c);
|
ChangeNotes notes = newNotes(c);
|
||||||
@@ -748,7 +748,7 @@ public class ChangeNotesTest {
|
|||||||
+ "Patch-set: 1\n",
|
+ "Patch-set: 1\n",
|
||||||
commit.getFullMessage());
|
commit.getFullMessage());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeNotes notes = newNotes(c);
|
ChangeNotes notes = newNotes(c);
|
||||||
@@ -789,7 +789,7 @@ public class ChangeNotesTest {
|
|||||||
+ "Patch-set: 1\n",
|
+ "Patch-set: 1\n",
|
||||||
commit.getFullMessage());
|
commit.getFullMessage());
|
||||||
} finally {
|
} finally {
|
||||||
walk.release();
|
walk.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeNotes notes = newNotes(c);
|
ChangeNotes notes = newNotes(c);
|
||||||
|
@@ -431,7 +431,7 @@ public class CommitMsgHookTest extends HookTestCase {
|
|||||||
oi.flush();
|
oi.flush();
|
||||||
return e;
|
return e;
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -457,7 +457,7 @@ public class CommitMsgHookTest extends HookTestCase {
|
|||||||
fail(Constants.HEAD + " did not change: " + ref.getResult());
|
fail(Constants.HEAD + " did not change: " + ref.getResult());
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
oi.release();
|
oi.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
include_defs('//lib/maven.defs')
|
include_defs('//lib/maven.defs')
|
||||||
|
|
||||||
REPO = MAVEN_CENTRAL # Leave here even if set to MAVEN_CENTRAL.
|
REPO = MAVEN_CENTRAL # Leave here even if set to MAVEN_CENTRAL.
|
||||||
VERS = '4.0.0.201505050340-m2'
|
VERS = '4.0.0.201506090130-r'
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = 'jgit',
|
name = 'jgit',
|
||||||
id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS,
|
id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS,
|
||||||
bin_sha1 = '1cc3120d39ed2b55584e631634e65c5d2e6c1cf7',
|
bin_sha1 = '859b5dbae0372bc0744503b9593119410c0474f2',
|
||||||
src_sha1 = '425f578cc9d5ccb8f3b050a5ab1e2d7a0becb25d',
|
src_sha1 = '5a7b7e179852c20f6af8581b96cf6441b23025a5',
|
||||||
license = 'jgit',
|
license = 'jgit',
|
||||||
repository = REPO,
|
repository = REPO,
|
||||||
unsign = True,
|
unsign = True,
|
||||||
@@ -22,7 +22,7 @@ maven_jar(
|
|||||||
maven_jar(
|
maven_jar(
|
||||||
name = 'jgit-servlet',
|
name = 'jgit-servlet',
|
||||||
id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS,
|
id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS,
|
||||||
sha1 = '2a9f55d1d92afef795542b995db6ab261007857f',
|
sha1 = 'd86da25c9e1042612ebe3be1e027cce4d9a8e4c9',
|
||||||
license = 'jgit',
|
license = 'jgit',
|
||||||
repository = REPO,
|
repository = REPO,
|
||||||
deps = [':jgit'],
|
deps = [':jgit'],
|
||||||
@@ -36,7 +36,7 @@ maven_jar(
|
|||||||
maven_jar(
|
maven_jar(
|
||||||
name = 'jgit-archive',
|
name = 'jgit-archive',
|
||||||
id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS,
|
id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS,
|
||||||
sha1 = 'ee3954753067818f8f734981a01c13ac33425f2c',
|
sha1 = '3b1f5cefdd65bbe81851f638ee1f461c9cb5df20',
|
||||||
license = 'jgit',
|
license = 'jgit',
|
||||||
repository = REPO,
|
repository = REPO,
|
||||||
deps = [':jgit',
|
deps = [':jgit',
|
||||||
@@ -53,7 +53,7 @@ maven_jar(
|
|||||||
maven_jar(
|
maven_jar(
|
||||||
name = 'junit',
|
name = 'junit',
|
||||||
id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS,
|
id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS,
|
||||||
sha1 = '6cc19f8f0a1791e26d4225625ecba6a31d9b830e',
|
sha1 = 'e86c5b8ec06624d3cd2b8c11fd0c528281751329',
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
license = 'DO_NOT_DISTRIBUTE',
|
||||||
repository = REPO,
|
repository = REPO,
|
||||||
unsign = True,
|
unsign = True,
|
||||||
|
Submodule plugins/reviewnotes updated: 61702414c0...0b5aab6820
Reference in New Issue
Block a user