summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-12-15 11:41:32 +0100
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2012-12-27 11:57:34 -0500
commit04bc9b3ddcaa8f1535d90a2f712706c6c5597cd4 (patch)
tree73c97b9dc481d18b66ccee627ace517ab73967dd /org.eclipse.jgit.http.test
parent92893d1f92b12922a41accd53da19b074090f15e (diff)
downloadjgit-04bc9b3ddcaa8f1535d90a2f712706c6c5597cd4.tar.gz
jgit-04bc9b3ddcaa8f1535d90a2f712706c6c5597cd4.zip
Add type argumente to some raw reclaration
Change-Id: Ief195fb5c55f75172f0428fdac8c8874292ae566
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java5
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java5
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java5
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java5
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java24
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java4
6 files changed, 32 insertions, 16 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
index e35197ad42..04f7c52f95 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
@@ -50,6 +50,7 @@ import static org.junit.Assert.fail;
import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.eclipse.jetty.server.Request;
@@ -68,7 +69,7 @@ import org.junit.Test;
public class DefaultReceivePackFactoryTest extends LocalDiskRepositoryTestCase {
private Repository db;
- private ReceivePackFactory factory;
+ private ReceivePackFactory<HttpServletRequest> factory;
@Before
public void setUp() throws Exception {
@@ -80,7 +81,7 @@ public class DefaultReceivePackFactoryTest extends LocalDiskRepositoryTestCase {
@Test
public void testDisabledSingleton() throws ServiceNotAuthorizedException {
- factory = ReceivePackFactory.DISABLED;
+ factory = (ReceivePackFactory<HttpServletRequest>) ReceivePackFactory.DISABLED;
try {
factory.create(new R(null, "localhost"), db);
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
index 38dc72fa33..bc13703676 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
@@ -49,6 +49,7 @@ import static org.junit.Assert.fail;
import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.eclipse.jetty.server.Request;
@@ -66,7 +67,7 @@ import org.junit.Test;
public class DefaultUploadPackFactoryTest extends LocalDiskRepositoryTestCase {
private Repository db;
- private UploadPackFactory factory;
+ private UploadPackFactory<HttpServletRequest> factory;
@Before
public void setUp() throws Exception {
@@ -78,7 +79,7 @@ public class DefaultUploadPackFactoryTest extends LocalDiskRepositoryTestCase {
@Test
public void testDisabledSingleton() throws ServiceNotAuthorizedException {
- factory = UploadPackFactory.DISABLED;
+ factory = (UploadPackFactory<HttpServletRequest>) UploadPackFactory.DISABLED;
try {
factory.create(new R(null, "localhost"), db);
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
index 5899dd41d2..bb9f47022b 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
@@ -70,6 +70,7 @@ import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.transport.FetchConnection;
import org.eclipse.jgit.transport.HttpTransport;
import org.eclipse.jgit.transport.Transport;
@@ -91,7 +92,7 @@ public class DumbClientDumbServerTest extends HttpTestCase {
public void setUp() throws Exception {
super.setUp();
- final TestRepository src = createTestRepository();
+ final TestRepository<FileRepository> src = createTestRepository();
final File srcGit = src.getRepository().getDirectory();
final URI base = srcGit.getParentFile().toURI();
@@ -198,7 +199,7 @@ public class DumbClientDumbServerTest extends HttpTestCase {
@Test
public void testInitialClone_Packed() throws Exception {
- new TestRepository(remoteRepository).packAndPrune();
+ new TestRepository<Repository>(remoteRepository).packAndPrune();
Repository dst = createBareRepository();
assertFalse(dst.hasObject(A_txt));
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java
index b81cca1ca4..4ddfcc5ccf 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java
@@ -74,6 +74,7 @@ import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.transport.FetchConnection;
import org.eclipse.jgit.transport.HttpTransport;
import org.eclipse.jgit.transport.Transport;
@@ -97,7 +98,7 @@ public class DumbClientSmartServerTest extends HttpTestCase {
public void setUp() throws Exception {
super.setUp();
- final TestRepository src = createTestRepository();
+ final TestRepository<FileRepository> src = createTestRepository();
final String srcName = src.getRepository().getDirectory().getName();
ServletContextHandler app = server.addContext("/git");
@@ -217,7 +218,7 @@ public class DumbClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_Packed() throws Exception {
- new TestRepository(remoteRepository).packAndPrune();
+ new TestRepository<Repository>(remoteRepository).packAndPrune();
Repository dst = createBareRepository();
assertFalse(dst.hasObject(A_txt));
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
index f249098849..cafb9590e1 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
@@ -56,6 +56,7 @@ import org.eclipse.jgit.errors.RepositoryNotFoundException;
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.resolver.FileResolver;
+import org.eclipse.jgit.transport.resolver.RepositoryResolver;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.eclipse.jgit.util.FileUtils;
import org.junit.Test;
@@ -82,7 +83,8 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
private void assertUnreasonable(String name)
throws ServiceNotEnabledException {
- FileResolver r = new FileResolver(new File("."), false);
+ FileResolver<RepositoryResolver> r = new FileResolver<RepositoryResolver>(
+ new File("."), false);
try {
r.open(null, name);
fail("Opened unreasonable name \"" + name + "\"");
@@ -98,10 +100,13 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
final String name = a.getDirectory().getName();
final File base = a.getDirectory().getParentFile();
final File export = new File(a.getDirectory(), "git-daemon-export-ok");
- FileResolver resolver;
+ FileResolver<RepositoryResolver> resolver;
assertFalse("no git-daemon-export-ok", export.exists());
- resolver = new FileResolver(base, false /* require flag */);
+ resolver = new FileResolver<RepositoryResolver>(base, false /*
+ * require
+ * flag
+ */);
try {
resolver.open(null, name);
fail("opened non-exported repository");
@@ -109,7 +114,10 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
assertEquals("Service not enabled", e.getMessage());
}
- resolver = new FileResolver(base, true /* export all */);
+ resolver = new FileResolver<RepositoryResolver>(base, true /*
+ * export
+ * all
+ */);
try {
resolver.open(null, name).close();
} catch (ServiceNotEnabledException e) {
@@ -117,7 +125,10 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
}
FileUtils.createNewFile(export);
- resolver = new FileResolver(base, false /* require flag */);
+ resolver = new FileResolver<RepositoryResolver>(base, false /*
+ * require
+ * flag
+ */);
try {
resolver.open(null, name).close();
} catch (ServiceNotEnabledException e) {
@@ -131,7 +142,8 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
final Repository a = createBareRepository();
final String name = a.getDirectory().getName() + "-not-a-git";
final File base = a.getDirectory().getParentFile();
- FileResolver resolver = new FileResolver(base, false);
+ FileResolver<RepositoryResolver> resolver = new FileResolver<RepositoryResolver>(
+ base, false);
try {
resolver.open(null, name);
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
index 2a39c9f39c..4f0543aec1 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
@@ -320,7 +320,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
// Create a new commit on the remote.
//
- b = new TestRepository(remoteRepository).branch(master);
+ b = new TestRepository<Repository>(remoteRepository).branch(master);
RevCommit Z = b.commit().message("Z").create();
// Now incrementally update.
@@ -386,7 +386,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
// Create a new commit on the remote.
//
- b = new TestRepository(remoteRepository).branch(master);
+ b = new TestRepository<Repository>(remoteRepository).branch(master);
RevCommit Z = b.commit().message("Z").create();
// Now incrementally update.