summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2016-01-06 10:17:52 -0800
committerShawn Pearce <spearce@spearce.org>2016-01-06 15:18:15 -0500
commit24cd8e170d377cef87166d43ca25bfa2340755c6 (patch)
tree7b2d08e588c10a02d057fc6ab05a9cff3071c0b5 /org.eclipse.jgit.http.test
parent5001038f521f7624068bd1e03e0b816fd32d9ef3 (diff)
downloadjgit-24cd8e170d377cef87166d43ca25bfa2340755c6.tar.gz
jgit-24cd8e170d377cef87166d43ca25bfa2340755c6.zip
GitServletResponseTest: Fix testObjectCheckerException
The recent ObjectChecker changes to pass in AnyObjectId as part of the checkCommit method signature meant the override here was no longer throwing an exception as expected. Change-Id: I0383018b48426e25a0bc562387e8cd73cbe13129
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java
index fba1a52640..4b15d4b533 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java
@@ -60,6 +60,7 @@ import org.eclipse.jgit.http.server.GitServlet;
import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory;
import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.junit.http.HttpTestCase;
+import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ObjectChecker;
@@ -221,8 +222,9 @@ public class GitServletResponseTests extends HttpTestCase {
preHook = null;
oc = new ObjectChecker() {
@Override
- public void checkCommit(byte[] raw) throws CorruptObjectException {
- throw new IllegalStateException();
+ public void checkCommit(AnyObjectId id, byte[] raw)
+ throws CorruptObjectException {
+ throw new CorruptObjectException("refusing all commits");
}
};