diff options
Diffstat (limited to 'org.eclipse.jgit.junit.http')
7 files changed, 25 insertions, 2 deletions
diff --git a/org.eclipse.jgit.junit.http/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.junit.http/.settings/org.eclipse.jdt.core.prefs index 10c29d5576..47cca36924 100644 --- a/org.eclipse.jgit.junit.http/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.junit.http/.settings/org.eclipse.jdt.core.prefs @@ -56,7 +56,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java index aaccc66f55..6580ade8ea 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java @@ -153,6 +153,7 @@ public class AccessEvent { return responseHeaders.get(name); } + @Override public String toString() { StringBuilder b = new StringBuilder(); b.append(method); diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java index 09754317ed..1575cb650c 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java @@ -184,7 +184,6 @@ public class AppServer { return new UserPrincipal(username, Credential.getCredential(Crypt.crypt(username, password))); } - } private void auth(ServletContextHandler ctx, Authenticator authType) { diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java index ab5d3e1d90..5db76eb7b9 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java @@ -74,11 +74,13 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { /** In-memory application server; subclass must start. */ protected AppServer server; + @Override public void setUp() throws Exception { super.setUp(); server = new AppServer(); } + @Override public void tearDown() throws Exception { server.tearDown(); super.tearDown(); diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java index 59765890bd..4f11ea8fca 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java @@ -58,27 +58,33 @@ public class MockServletConfig implements ServletConfig { parameters.put(name, value); } + @Override public String getInitParameter(String name) { return parameters.get(name); } + @Override public Enumeration<String> getInitParameterNames() { final Iterator<String> i = parameters.keySet().iterator(); return new Enumeration<String>() { + @Override public boolean hasMoreElements() { return i.hasNext(); } + @Override public String nextElement() { return i.next(); } }; } + @Override public String getServletName() { return "MOCK_SERVLET"; } + @Override public ServletContext getServletContext() { return null; } diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java index c7545a94b4..5fed122637 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java @@ -95,10 +95,12 @@ public class RecordingLogger implements Logger { this.name = name; } + @Override public Logger getLogger(@SuppressWarnings("hiding") String name) { return new RecordingLogger(name); } + @Override public String getName() { return name; } @@ -109,6 +111,7 @@ public class RecordingLogger implements Logger { } } + @Override public void warn(String msg, Throwable th) { synchronized (warnings) { warnings.add(new Warning(msg, th)); @@ -127,6 +130,7 @@ public class RecordingLogger implements Logger { // Ignore (not relevant to test failures) } + @Override public void debug(String msg, Throwable th) { // Ignore (not relevant to test failures) } @@ -145,14 +149,17 @@ public class RecordingLogger implements Logger { // Ignore (not relevant to test failures) } + @Override public boolean isDebugEnabled() { return false; } + @Override public void setDebugEnabled(boolean enabled) { // Ignore (not relevant to test failures) } + @Override public void warn(String msg, Object... args) { synchronized (warnings) { warnings.add(new Warning( @@ -160,32 +167,39 @@ public class RecordingLogger implements Logger { } } + @Override public void warn(Throwable thrown) { synchronized (warnings) { warnings.add(new Warning(thrown)); } } + @Override public void info(String msg, Object... args) { // Ignore (not relevant to test failures) } + @Override public void info(Throwable thrown) { // Ignore (not relevant to test failures) } + @Override public void info(String msg, Throwable thrown) { // Ignore (not relevant to test failures) } + @Override public void debug(String msg, Object... args) { // Ignore (not relevant to test failures) } + @Override public void debug(Throwable thrown) { // Ignore (not relevant to test failures) } + @Override public void ignore(Throwable arg0) { // Ignore (not relevant to test failures) } 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 e550e6c567..605c69a844 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 @@ -92,6 +92,7 @@ public class SimpleHttpServer { private ServletContextHandler smart(final String path) { GitServlet gs = new GitServlet(); gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() { + @Override public Repository open(HttpServletRequest req, String name) throws RepositoryNotFoundException, ServiceNotEnabledException { |