diff options
Diffstat (limited to 'org.eclipse.jgit.junit.http')
7 files changed, 12 insertions, 12 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 47cca36924..64f74989e1 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 @@ -76,7 +76,7 @@ org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=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 6580ade8ea..6b7853d730 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 @@ -76,7 +76,7 @@ public class AccessEvent { } private static Map<String, String> cloneHeaders(final Request req) { - Map<String, String> r = new TreeMap<String, String>(); + Map<String, String> r = new TreeMap<>(); Enumeration hn = req.getHeaderNames(); while (hn.hasMoreElements()) { String key = (String) hn.nextElement(); @@ -88,7 +88,7 @@ public class AccessEvent { } private static Map<String, String> cloneHeaders(final Response rsp) { - Map<String, String> r = new TreeMap<String, String>(); + Map<String, String> r = new TreeMap<>(); Enumeration<String> hn = rsp.getHttpFields().getFieldNames(); while (hn.hasMoreElements()) { String key = hn.nextElement(); 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 1575cb650c..e9480fa9ff 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 @@ -262,7 +262,7 @@ public class AppServer { /** @return all requests since the server was started. */ public List<AccessEvent> getRequests() { - return new ArrayList<AccessEvent>(log.getEvents()); + return new ArrayList<>(log.getEvents()); } /** @@ -282,7 +282,7 @@ public class AppServer { * @return all requests which match the given path. */ public List<AccessEvent> getRequests(String path) { - ArrayList<AccessEvent> r = new ArrayList<AccessEvent>(); + ArrayList<AccessEvent> r = new ArrayList<>(); for (AccessEvent event : log.getEvents()) { if (event.getPath().equals(path)) { r.add(event); 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 5db76eb7b9..1b94e02fa4 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 @@ -88,7 +88,7 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { protected TestRepository<Repository> createTestRepository() throws IOException { - return new TestRepository<Repository>(createBareRepository()); + return new TestRepository<>(createBareRepository()); } protected URIish toURIish(String path) throws URISyntaxException { @@ -120,12 +120,12 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { protected static void fsck(Repository db, RevObject... tips) throws Exception { TestRepository<? extends Repository> tr = - new TestRepository<Repository>(db); + new TestRepository<>(db); tr.fsck(tips); } protected static Set<RefSpec> mirror(String... refs) { - HashSet<RefSpec> r = new HashSet<RefSpec>(); + HashSet<RefSpec> r = new HashSet<>(); for (String name : refs) { RefSpec rs = new RefSpec(name); rs = rs.setDestination(name); 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 4f11ea8fca..9defcd9833 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 @@ -52,7 +52,7 @@ import javax.servlet.ServletConfig; import javax.servlet.ServletContext; public class MockServletConfig implements ServletConfig { - private final Map<String, String> parameters = new HashMap<String, String>(); + private final Map<String, String> parameters = new HashMap<>(); public void setInitParameter(String name, String value) { parameters.put(name, value); 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 5fed122637..f28ef893bb 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 @@ -53,7 +53,7 @@ import org.slf4j.helpers.MessageFormatter; /** Logs warnings into an array for later inspection. */ public class RecordingLogger implements Logger { - private static List<Warning> warnings = new ArrayList<Warning>(); + private static List<Warning> warnings = new ArrayList<>(); /** Clear the warnings, automatically done by {@link AppServer#setUp()} */ public static void clear() { @@ -65,7 +65,7 @@ public class RecordingLogger implements Logger { /** @return the warnings (if any) from the last execution */ public static List<Warning> getWarnings() { synchronized (warnings) { - ArrayList<Warning> copy = new ArrayList<Warning>(warnings); + ArrayList<Warning> copy = new ArrayList<>(warnings); return Collections.unmodifiableList(copy); } } diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java index 14ea03a921..c218c07a6c 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java @@ -61,7 +61,7 @@ import org.eclipse.jetty.server.handler.HandlerWrapper; class TestRequestLog extends HandlerWrapper { private static final int MAX = 16; - private final List<AccessEvent> events = new ArrayList<AccessEvent>(); + private final List<AccessEvent> events = new ArrayList<>(); private final Semaphore active = new Semaphore(MAX); |