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>tags/v5.4.0.201905081430-m2
@@ -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; |
@@ -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); |
@@ -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} */ |