Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2019-05-22 17:37:40 +0000
committerMatthias Sohn2019-05-22 17:37:40 +0000
commitbed7a45fb51fe8e89b32395053e64fc4b1d59ffc (patch)
tree61483d9d00614acf3276492d52fc358157764aa9 /org.eclipse.jgit.junit.http
parentd31716f883a25789c85a1043451a13efc7090d97 (diff)
parent82169296184acdbb8e9ce588f34e8c083dd4c4c1 (diff)
downloadjgit-bed7a45fb51fe8e89b32395053e64fc4b1d59ffc.tar.gz
jgit-bed7a45fb51fe8e89b32395053e64fc4b1d59ffc.tar.xz
jgit-bed7a45fb51fe8e89b32395053e64fc4b1d59ffc.zip
Merge branch 'master' into stable-5.4
* master: ReachabilityCheckers: @since 5.4 Update Orbit to S20190521195709 for 2019-06 M3 Tune max heap size for tests GPG: check that the key found is a signing key GPG: use key fingerprint suffix to compare id for signing key Recognize ReachabilityCheckerTestCase as helper UploadPack: restore inadvertently deleted line UploadPack: Use reachability checker to validate non-advertised wants Bazel: Simplify names of bouncy castle libraries Convert to lambda or member reference BitmappedReachabilityChecker: Reachability check using bitmaps BitmapCalculator: Get the reachability bitmap of a commit ReachabilityChecker: Default implementation with a RevWalk Change-Id: I323c460853230abcffa94c4f34f15dbaff8c330c
Diffstat (limited to 'org.eclipse.jgit.junit.http')
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
index 245b510fe1..7c78330828 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
@@ -54,8 +54,6 @@ import org.eclipse.jgit.errors.RepositoryNotFoundException;
import org.eclipse.jgit.http.server.GitServlet;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
/**
* Simple http server for testing http access to Git repositories.
@@ -136,17 +134,12 @@ public class SimpleHttpServer {
private ServletContextHandler smart(String path) {
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(nameOf(db)))
- throw new RepositoryNotFoundException(name);
-
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(nameOf(db))) {
+ throw new RepositoryNotFoundException(name);
}
+ db.incrementOpen();
+ return db;
});
ServletContextHandler ctx = server.addContext(path);

Back to the top