summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java2
-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
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java16
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java4
13 files changed, 51 insertions, 33 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java
index 11c3de39e4..bca521025d 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java
@@ -182,7 +182,7 @@ public class GitServlet extends MetaServlet {
return config.getInitParameter(name);
}
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
return config.getInitParameterNames();
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java
index c7ca2b2898..8dfcc4d149 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java
@@ -63,7 +63,7 @@ final class NoParameterFilterConfig implements FilterConfig {
return null;
}
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
return new Enumeration<String>() {
public boolean hasMoreElements() {
return false;
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
index 53008deb11..2d0b844072 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
@@ -125,7 +125,7 @@ abstract class UrlPipeline {
return null;
}
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
return new Enumeration<String>() {
public boolean hasMoreElements() {
return false;
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.
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
index a183a1ce73..efdaa7bd70 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
@@ -54,6 +54,7 @@ import org.eclipse.jgit.dircache.DirCacheIterator;
import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryTestCase;
import org.eclipse.jgit.patch.FileHeader;
import org.eclipse.jgit.patch.HunkHeader;
@@ -79,13 +80,13 @@ public class DiffFormatterTest extends RepositoryTestCase {
private DiffFormatter df;
- private TestRepository testDb;
+ private TestRepository<Repository> testDb;
@Override
@Before
public void setUp() throws Exception {
super.setUp();
- testDb = new TestRepository(db);
+ testDb = new TestRepository<Repository>(db);
df = new DiffFormatter(DisabledOutputStream.INSTANCE);
df.setRepository(db);
df.setAbbreviationLength(8);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
index 70e45444ac..6b35a2bd3b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.lib.AbbreviatedObjectId;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -67,13 +68,13 @@ public class RenameDetectorTest extends RepositoryTestCase {
private RenameDetector rd;
- private TestRepository testDb;
+ private TestRepository<Repository> testDb;
@Override
@Before
public void setUp() throws Exception {
super.setUp();
- testDb = new TestRepository(db);
+ testDb = new TestRepository<Repository>(db);
rd = new RenameDetector(db);
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java
index 9514aaa5ee..9cf01a98e5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java
@@ -148,7 +148,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testTinyThinPack() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
RevBlob a = d.blob("a");
TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
@@ -186,7 +186,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testPackWithTrailingGarbage() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
RevBlob a = d.blob("a");
TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
@@ -213,7 +213,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testMaxObjectSizeFullBlob() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
final byte[] data = Constants.encode("0123456789");
d.blob(data);
@@ -245,7 +245,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testMaxObjectSizeDeltaBlock() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
RevBlob a = d.blob("a");
TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
@@ -276,7 +276,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testMaxObjectSizeDeltaResultSize() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
RevBlob a = d.blob("0123456789");
TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
@@ -306,7 +306,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testNonMarkingInputStream() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
RevBlob a = d.blob("a");
TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
@@ -344,7 +344,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testDataAfterPackFooterSingleRead() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
RevBlob a = d.blob("a");
TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(32*1024);
@@ -402,7 +402,7 @@ public class PackParserTest extends RepositoryTestCase {
@Test
public void testDataAfterPackFooterSplitHeaderRead() throws Exception {
- TestRepository d = new TestRepository(db);
+ TestRepository d = new TestRepository<Repository>(db);
final byte[] data = Constants.encode("a");
RevBlob b = d.blob(data);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
index 5f17394e2e..9e52bcaa5f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
@@ -108,7 +108,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
// Fill dst with a some common history.
//
- TestRepository d = new TestRepository(dst);
+ TestRepository<Repository> d = new TestRepository<Repository>(dst);
a = d.blob("a");
A = d.commit(d.tree(d.file("a", a)));
B = d.commit().parent(A).create();
@@ -201,7 +201,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
// Now use b but in a different commit than what is hidden.
//
- TestRepository s = new TestRepository(src);
+ TestRepository<Repository> s = new TestRepository<Repository>(src);
RevCommit N = s.commit().parent(B).add("q", b).create();
s.update(R_MASTER, N);