Browse Source

Remove unnecessary type specifications

Since Java 7 the diamond operator can be used instead of explicit
type parameters.

Change-Id: I2dee5fce7afebb1d9088eeaec4484ee58b4fa492
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.4
Carsten Hammer 6 years ago committed by David Pursehouse
parent
commit
38eaa490f2
  1. 2
      org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java
  2. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
  3. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java

2
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java

@ -202,7 +202,7 @@ public class GitFilter extends MetaFilter {
if (resolver == null) {
File root = getFile(filterConfig, "base-path");
boolean exportAll = getBoolean(filterConfig, "export-all");
setRepositoryResolver(new FileResolver<HttpServletRequest>(root, exportAll));
setRepositoryResolver(new FileResolver<>(root, exportAll));
}
initialized = true;

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java

@ -1502,7 +1502,7 @@ public class PackWriter implements AutoCloseable {
Executor executor = config.getExecutor();
final List<Throwable> errors =
Collections.synchronizedList(new ArrayList<Throwable>(threads));
Collections.synchronizedList(new ArrayList<>(threads));
if (executor instanceof ExecutorService) {
// Caller supplied us a service, use it directly.
runTasks((ExecutorService) executor, pm, taskBlock, errors);

2
org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java

@ -88,7 +88,7 @@ public class IsolatedOutputStream extends OutputStream {
public IsolatedOutputStream(OutputStream out) {
dst = out;
copier = new ThreadPoolExecutor(1, 1, 0, TimeUnit.MILLISECONDS,
new ArrayBlockingQueue<Runnable>(1), new NamedThreadFactory());
new ArrayBlockingQueue<>(1), new NamedThreadFactory());
}
/** {@inheritDoc} */

Loading…
Cancel
Save