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
if (resolver == null) { | if (resolver == null) { | ||||
File root = getFile(filterConfig, "base-path"); | File root = getFile(filterConfig, "base-path"); | ||||
boolean exportAll = getBoolean(filterConfig, "export-all"); | boolean exportAll = getBoolean(filterConfig, "export-all"); | ||||
setRepositoryResolver(new FileResolver<HttpServletRequest>(root, exportAll)); | |||||
setRepositoryResolver(new FileResolver<>(root, exportAll)); | |||||
} | } | ||||
initialized = true; | initialized = true; |
Executor executor = config.getExecutor(); | Executor executor = config.getExecutor(); | ||||
final List<Throwable> errors = | final List<Throwable> errors = | ||||
Collections.synchronizedList(new ArrayList<Throwable>(threads)); | |||||
Collections.synchronizedList(new ArrayList<>(threads)); | |||||
if (executor instanceof ExecutorService) { | if (executor instanceof ExecutorService) { | ||||
// Caller supplied us a service, use it directly. | // Caller supplied us a service, use it directly. | ||||
runTasks((ExecutorService) executor, pm, taskBlock, errors); | runTasks((ExecutorService) executor, pm, taskBlock, errors); |
public IsolatedOutputStream(OutputStream out) { | public IsolatedOutputStream(OutputStream out) { | ||||
dst = out; | dst = out; | ||||
copier = new ThreadPoolExecutor(1, 1, 0, TimeUnit.MILLISECONDS, | copier = new ThreadPoolExecutor(1, 1, 0, TimeUnit.MILLISECONDS, | ||||
new ArrayBlockingQueue<Runnable>(1), new NamedThreadFactory()); | |||||
new ArrayBlockingQueue<>(1), new NamedThreadFactory()); | |||||
} | } | ||||
/** {@inheritDoc} */ | /** {@inheritDoc} */ |