summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.server/src
diff options
context:
space:
mode:
authorColby Ranger <cranger@google.com>2013-10-07 10:25:28 -0700
committerColby Ranger <cranger@google.com>2013-10-07 11:32:54 -0700
commit5218f7b33afc02bcd0029767e867222ddc000b09 (patch)
tree00bd1fcde2c54c1e6b6fa89c8b54b64a718a9eb3 /org.eclipse.jgit.http.server/src
parent7995d87713c1fed181643c2a6cf30ed464917e9a (diff)
downloadjgit-5218f7b33afc02bcd0029767e867222ddc000b09.tar.gz
jgit-5218f7b33afc02bcd0029767e867222ddc000b09.zip
Propagate IOException where possible when getting refs.
Currently, Repository.getAllRefs() and Repository.getTags() silently ignores an IOException and instead returns an empty map. Repository is a public API and as such cannot be changed until the next major revision change. Where possible, update the internal jgit APIs to use the RefDatabase directly, since it propagates the error. Change-Id: I4e4537d8bd0fa772f388262684c5c4ca1929dc4c
Diffstat (limited to 'org.eclipse.jgit.http.server/src')
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java
index 52f928548b..446f6a2c8d 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java
@@ -44,6 +44,7 @@
package org.eclipse.jgit.http.server;
import static org.eclipse.jgit.http.server.ServletUtils.getRepository;
+import static org.eclipse.jgit.lib.RefDatabase.ALL;
import java.io.IOException;
import java.io.OutputStreamWriter;
@@ -91,7 +92,7 @@ class InfoRefsServlet extends HttpServlet {
adv.init(db);
adv.setDerefTags(true);
- Map<String, Ref> refs = db.getAllRefs();
+ Map<String, Ref> refs = db.getRefDatabase().getRefs(ALL);
refs.remove(Constants.HEAD);
adv.send(refs);
out.close();