From: mr.gaffo@gmail.com Date: Sun, 13 Sep 2009 18:44:24 GMT Subject: [PATCH JGit 08/19] changed signature to allow a IOException Message-ID: <1252867475-858-9-git-send-email-mr.gaffo@gmail.com> In-Reply-To: <1252867475-858-8-git-send-email-mr.gaffo@gmail.com> From: mike.gaffney --- .../jgit/lib/AlternateRepositoryDatabase.java | 2 +- .../src/org/spearce/jgit/lib/ObjectDatabase.java | 3 ++- .../src/org/spearce/jgit/lib/ObjectDirectory.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java index 5cb0579..70ce505 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java @@ -132,7 +132,7 @@ protected void closeAlternates(final ObjectDatabase[] alt) { } @Override - public void updateInfoCache() { + public void updateInfoCache() throws IOException { odb.updateInfoCache(); } } diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java index 68ff523..5ded7bb 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java @@ -78,8 +78,9 @@ protected ObjectDatabase() { * Creates the caches that are typically done by * update-server-info, namely objects/info/packs and * info/refs + * @throws IOException */ - public abstract void updateInfoCache(); + public abstract void updateInfoCache() throws IOException; /** * Does this database exist yet? diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java index a90ae00..95618b9 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java @@ -516,7 +516,7 @@ boolean tryAgain(final long currLastModified) { } @Override - public void updateInfoCache() { - new UpdateDirectoryInfoCache(this.listLocalPacks(), this.infoDirectory).execute(); + public void updateInfoCache() throws IOException { + new UpdateDirectoryInfoCache(this.listLocalPacks(), new File(this.infoDirectory, "packs")).execute(); } } -- 1.6.4.2