Cleanup and format code

This commit is contained in:
Phillip Webb
2017-03-06 16:44:31 -08:00
parent c7b46e4d1c
commit d8f827d224
649 changed files with 1922 additions and 2003 deletions

View File

@@ -65,13 +65,13 @@ public final class RemoteSpringApplication {
}
private Collection<ApplicationContextInitializer<?>> getInitializers() {
List<ApplicationContextInitializer<?>> initializers = new ArrayList<ApplicationContextInitializer<?>>();
List<ApplicationContextInitializer<?>> initializers = new ArrayList<>();
initializers.add(new RestartScopeInitializer());
return initializers;
}
private Collection<ApplicationListener<?>> getListeners() {
List<ApplicationListener<?>> listeners = new ArrayList<ApplicationListener<?>>();
List<ApplicationListener<?>> listeners = new ArrayList<>();
listeners.add(new AnsiOutputApplicationListener());
listeners.add(new ConfigFileApplicationListener());
listeners.add(new ClasspathLoggingApplicationListener());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,7 +85,7 @@ public class DevToolsDataSourceAutoConfiguration {
static final class NonEmbeddedInMemoryDatabaseShutdownExecutor
implements DisposableBean {
private static final Set<String> IN_MEMORY_DRIVER_CLASS_NAMES = new HashSet<String>(
private static final Set<String> IN_MEMORY_DRIVER_CLASS_NAMES = new HashSet<>(
Arrays.asList("org.apache.derby.jdbc.EmbeddedDriver", "org.h2.Driver",
"org.h2.jdbcx.JdbcDataSource", "org.hsqldb.jdbcDriver",
"org.hsqldb.jdbc.JDBCDriver",

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@ public class DevToolsProperties {
/**
* Additional paths to watch for changes.
*/
private List<File> additionalPaths = new ArrayList<File>();
private List<File> additionalPaths = new ArrayList<>();
public boolean isEnabled() {
return this.enabled;
@@ -112,7 +112,7 @@ public class DevToolsProperties {
}
public String[] getAllExclude() {
List<String> allExclude = new ArrayList<String>();
List<String> allExclude = new ArrayList<>();
if (StringUtils.hasText(this.exclude)) {
allExclude.addAll(StringUtils.commaDelimitedListToSet(this.exclude));
}

View File

@@ -95,9 +95,11 @@ public class RemoteDevToolsAutoConfiguration {
@Bean
public HandlerMapper remoteDevToolsHealthCheckHandlerMapper() {
Handler handler = new HttpStatusHandler();
return new UrlHandlerMapper((this.serverProperties.getServlet().getContextPath() == null ? ""
: this.serverProperties.getServlet().getContextPath())
+ this.properties.getRemote().getContextPath(), handler);
return new UrlHandlerMapper(
(this.serverProperties.getServlet().getContextPath() == null ? ""
: this.serverProperties.getServlet().getContextPath())
+ this.properties.getRemote().getContextPath(),
handler);
}
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ public class ClassPathFolders implements Iterable<File> {
private static final Log logger = LogFactory.getLog(ClassPathFolders.class);
private final List<File> folders = new ArrayList<File>();
private final List<File> folders = new ArrayList<>();
public ClassPathFolders(URL[] urls) {
if (urls != null) {

View File

@@ -45,7 +45,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
private static final Map<String, Object> PROPERTIES;
static {
Map<String, Object> properties = new HashMap<String, Object>();
Map<String, Object> properties = new HashMap<>();
properties.put("spring.thymeleaf.cache", "false");
properties.put("spring.freemarker.cache", "false");
properties.put("spring.groovy.template.cache", "false");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ public class FileSystemWatcher {
private static final long DEFAULT_QUIET_PERIOD = 400;
private final List<FileChangeListener> listeners = new ArrayList<FileChangeListener>();
private final List<FileChangeListener> listeners = new ArrayList<>();
private final boolean daemon;
@@ -55,7 +55,7 @@ public class FileSystemWatcher {
private final AtomicInteger remainingScans = new AtomicInteger(-1);
private final Map<File, FolderSnapshot> folders = new HashMap<File, FolderSnapshot>();
private final Map<File, FolderSnapshot> folders = new HashMap<>();
private Thread watchThread;
@@ -152,12 +152,11 @@ public class FileSystemWatcher {
synchronized (this.monitor) {
saveInitialSnapshots();
if (this.watchThread == null) {
Map<File, FolderSnapshot> localFolders = new HashMap<File, FolderSnapshot>();
Map<File, FolderSnapshot> localFolders = new HashMap<>();
localFolders.putAll(this.folders);
this.watchThread = new Thread(new Watcher(this.remainingScans,
new ArrayList<FileChangeListener>(this.listeners),
this.triggerFilter, this.pollInterval, this.quietPeriod,
localFolders));
new ArrayList<>(this.listeners), this.triggerFilter,
this.pollInterval, this.quietPeriod, localFolders));
this.watchThread.setName("File Watcher");
this.watchThread.setDaemon(this.daemon);
this.watchThread.start();
@@ -276,7 +275,7 @@ public class FileSystemWatcher {
}
private Map<File, FolderSnapshot> getCurrentSnapshots() {
Map<File, FolderSnapshot> snapshots = new LinkedHashMap<File, FolderSnapshot>();
Map<File, FolderSnapshot> snapshots = new LinkedHashMap<>();
for (File folder : this.folders.keySet()) {
snapshots.put(folder, new FolderSnapshot(folder));
}
@@ -284,8 +283,8 @@ public class FileSystemWatcher {
}
private void updateSnapshots(Collection<FolderSnapshot> snapshots) {
Map<File, FolderSnapshot> updated = new LinkedHashMap<File, FolderSnapshot>();
Set<ChangedFiles> changeSet = new LinkedHashSet<ChangedFiles>();
Map<File, FolderSnapshot> updated = new LinkedHashMap<>();
Set<ChangedFiles> changeSet = new LinkedHashSet<>();
for (FolderSnapshot snapshot : snapshots) {
FolderSnapshot previous = this.folders.get(snapshot.getFolder());
updated.put(snapshot.getFolder(), snapshot);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
class FolderSnapshot {
private static final Set<String> DOT_FOLDERS = Collections
.unmodifiableSet(new HashSet<String>(Arrays.asList(".", "..")));
.unmodifiableSet(new HashSet<>(Arrays.asList(".", "..")));
private final File folder;
@@ -55,7 +55,7 @@ class FolderSnapshot {
Assert.isTrue(folder.isDirectory(), "Folder must not be a file");
this.folder = folder;
this.time = new Date();
Set<FileSnapshot> files = new LinkedHashSet<FileSnapshot>();
Set<FileSnapshot> files = new LinkedHashSet<>();
collectFiles(folder, files);
this.files = Collections.unmodifiableSet(files);
}
@@ -80,7 +80,7 @@ class FolderSnapshot {
File folder = this.folder;
Assert.isTrue(snapshot.folder.equals(folder),
"Snapshot source folder must be '" + folder + "'");
Set<ChangedFile> changes = new LinkedHashSet<ChangedFile>();
Set<ChangedFile> changes = new LinkedHashSet<>();
Map<File, FileSnapshot> previousFiles = getFilesMap();
for (FileSnapshot currentFile : snapshot.files) {
if (acceptChangedFile(triggerFilter, currentFile)) {
@@ -107,7 +107,7 @@ class FolderSnapshot {
}
private Map<File, FileSnapshot> getFilesMap() {
Map<File, FileSnapshot> files = new LinkedHashMap<File, FileSnapshot>();
Map<File, FileSnapshot> files = new LinkedHashMap<>();
for (FileSnapshot file : this.files) {
files.put(file.getFile(), file);
}
@@ -141,7 +141,7 @@ class FolderSnapshot {
if (filter == null) {
return source;
}
Set<FileSnapshot> filtered = new LinkedHashSet<FileSnapshot>();
Set<FileSnapshot> filtered = new LinkedHashSet<>();
for (FileSnapshot file : source) {
if (filter.accept(file.getFile())) {
filtered.add(file);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,7 +56,7 @@ public class LiveReloadServer {
private final ExecutorService executor = Executors
.newCachedThreadPool(new WorkerThreadFactory());
private final List<Connection> connections = new ArrayList<Connection>();
private final List<Connection> connections = new ArrayList<>();
private final Object monitor = new Object();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,7 +61,7 @@ public class ClassPathChangeUploader
private static final Map<ChangedFile.Type, ClassLoaderFile.Kind> TYPE_MAPPINGS;
static {
Map<ChangedFile.Type, ClassLoaderFile.Kind> map = new HashMap<ChangedFile.Type, ClassLoaderFile.Kind>();
Map<ChangedFile.Type, ClassLoaderFile.Kind> map = new HashMap<>();
map.put(ChangedFile.Type.ADD, ClassLoaderFile.Kind.ADDED);
map.put(ChangedFile.Type.DELETE, ClassLoaderFile.Kind.DELETED);
map.put(ChangedFile.Type.MODIFY, ClassLoaderFile.Kind.MODIFIED);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ public class Dispatcher {
Assert.notNull(accessManager, "AccessManager must not be null");
Assert.notNull(mappers, "Mappers must not be null");
this.accessManager = accessManager;
this.mappers = new ArrayList<HandlerMapper>(mappers);
this.mappers = new ArrayList<>(mappers);
AnnotationAwareOrderComparator.sort(this.mappers);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ public abstract class AgentReloader {
private static final Set<String> AGENT_CLASSES;
static {
Set<String> agentClasses = new LinkedHashSet<String>();
Set<String> agentClasses = new LinkedHashSet<>();
agentClasses.add("org.zeroturnaround.javarebel.Integration");
agentClasses.add("org.zeroturnaround.javarebel.ReloaderFactory");
AGENT_CLASSES = Collections.unmodifiableSet(agentClasses);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ final class ChangeableUrls implements Iterable<URL> {
private ChangeableUrls(URL... urls) {
DevToolsSettings settings = DevToolsSettings.get();
List<URL> reloadableUrls = new ArrayList<URL>(urls.length);
List<URL> reloadableUrls = new ArrayList<>(urls.length);
for (URL url : urls) {
if ((settings.isRestartInclude(url) || isFolderUrl(url.toString()))
&& !settings.isRestartExclude(url)) {
@@ -90,7 +90,7 @@ final class ChangeableUrls implements Iterable<URL> {
}
public static ChangeableUrls fromUrlClassLoader(URLClassLoader classLoader) {
List<URL> urls = new ArrayList<URL>();
List<URL> urls = new ArrayList<>();
for (URL url : classLoader.getURLs()) {
urls.add(url);
urls.addAll(getUrlsFromClassPathOfJarManifestIfPossible(url));
@@ -136,7 +136,7 @@ final class ChangeableUrls implements Iterable<URL> {
return Collections.emptyList();
}
String[] entries = StringUtils.delimitedListToStringArray(classPath, " ");
List<URL> urls = new ArrayList<URL>(entries.length);
List<URL> urls = new ArrayList<>(entries.length);
for (String entry : entries) {
try {
urls.add(new URL(base, entry));
@@ -150,7 +150,7 @@ final class ChangeableUrls implements Iterable<URL> {
}
public static ChangeableUrls fromUrls(Collection<URL> urls) {
return fromUrls(new ArrayList<URL>(urls).toArray(new URL[urls.size()]));
return fromUrls(new ArrayList<>(urls).toArray(new URL[urls.size()]));
}
public static ChangeableUrls fromUrls(URL... urls) {

View File

@@ -108,7 +108,7 @@ final class ClassLoaderFilesResourcePatternResolver implements ResourcePatternRe
@Override
public Resource[] getResources(String locationPattern) throws IOException {
List<Resource> resources = new ArrayList<Resource>();
List<Resource> resources = new ArrayList<>();
Resource[] candidates = this.patternResolverDelegate
.getResources(locationPattern);
for (Resource candidate : candidates) {
@@ -122,7 +122,7 @@ final class ClassLoaderFilesResourcePatternResolver implements ResourcePatternRe
private List<Resource> getAdditionalResources(String locationPattern)
throws MalformedURLException {
List<Resource> additionalResources = new ArrayList<Resource>();
List<Resource> additionalResources = new ArrayList<>();
String trimmedLocationPattern = trimLocationPattern(locationPattern);
for (SourceFolder sourceFolder : this.classLoaderFiles.getSourceFolders()) {
for (Entry<String, ClassLoaderFile> entry : sourceFolder.getFilesEntrySet()) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ public class DefaultRestartInitializer implements RestartInitializer {
private static final Set<String> SKIPPED_STACK_ELEMENTS;
static {
Set<String> skipped = new LinkedHashSet<String>();
Set<String> skipped = new LinkedHashSet<>();
skipped.add("org.junit.runners.");
skipped.add("org.springframework.boot.test.");
skipped.add("cucumber.runtime.");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -89,13 +89,13 @@ public class Restarter {
private static Restarter instance;
private final Set<URL> urls = new LinkedHashSet<URL>();
private final Set<URL> urls = new LinkedHashSet<>();
private final ClassLoaderFiles classLoaderFiles = new ClassLoaderFiles();
private final Map<String, Object> attributes = new HashMap<String, Object>();
private final Map<String, Object> attributes = new HashMap<>();
private final BlockingDeque<LeakSafeThread> leakSafeThreads = new LinkedBlockingDeque<LeakSafeThread>();
private final BlockingDeque<LeakSafeThread> leakSafeThreads = new LinkedBlockingDeque<>();
private final Lock stopLock = new ReentrantLock();
@@ -119,7 +119,7 @@ public class Restarter {
private boolean finished = false;
private final List<ConfigurableApplicationContext> rootContexts = new CopyOnWriteArrayList<ConfigurableApplicationContext>();
private final List<ConfigurableApplicationContext> rootContexts = new CopyOnWriteArrayList<>();
/**
* Internal constructor to create a new {@link Restarter} instance.
@@ -387,7 +387,7 @@ public class Restarter {
*/
private void forceReferenceCleanup() {
try {
final List<long[]> memory = new LinkedList<long[]>();
final List<long[]> memory = new LinkedList<>();
while (true) {
memory.add(new long[102400]);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ public class ClassLoaderFiles implements ClassLoaderFileRepository, Serializable
* Create a new {@link ClassLoaderFiles} instance.
*/
public ClassLoaderFiles() {
this.sourceFolders = new LinkedHashMap<String, SourceFolder>();
this.sourceFolders = new LinkedHashMap<>();
}
/**
@@ -56,8 +56,7 @@ public class ClassLoaderFiles implements ClassLoaderFileRepository, Serializable
*/
public ClassLoaderFiles(ClassLoaderFiles classLoaderFiles) {
Assert.notNull(classLoaderFiles, "ClassLoaderFiles must not be null");
this.sourceFolders = new LinkedHashMap<String, SourceFolder>(
classLoaderFiles.sourceFolders);
this.sourceFolders = new LinkedHashMap<>(classLoaderFiles.sourceFolders);
}
/**
@@ -158,7 +157,7 @@ public class ClassLoaderFiles implements ClassLoaderFileRepository, Serializable
private final String name;
private final Map<String, ClassLoaderFile> files = new LinkedHashMap<String, ClassLoaderFile>();
private final Map<String, ClassLoaderFile> files = new LinkedHashMap<>();
SourceFolder(String name) {
this.name = name;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -98,7 +98,7 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad
resources.nextElement();
}
if (file.getKind() != Kind.DELETED) {
return new CompoundEnumeration<URL>(createFileUrl(name, file), resources);
return new CompoundEnumeration<>(createFileUrl(name, file), resources);
}
}
return resources;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public class DefaultSourceFolderUrlFilter implements SourceFolderUrlFilter {
private static final Pattern VERSION_PATTERN = Pattern
.compile("^-\\d+(?:\\.\\d+)*(?:[.-].+)?$");
private static final Set<String> SKIPPED_PROJECTS = new HashSet<String>(Arrays.asList(
private static final Set<String> SKIPPED_PROJECTS = new HashSet<>(Arrays.asList(
"spring-boot", "spring-boot-devtools", "spring-boot-autoconfigure",
"spring-boot-actuator", "spring-boot-starter"));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,7 +81,7 @@ public class RestartServer {
* @param files updated class loader files
*/
public void updateAndRestart(ClassLoaderFiles files) {
Set<URL> urls = new LinkedHashSet<URL>();
Set<URL> urls = new LinkedHashSet<>();
Set<URL> classLoaderUrls = getClassLoaderUrls();
for (SourceFolder folder : files.getSourceFolders()) {
for (Entry<String, ClassLoaderFile> entry : folder.getFilesEntrySet()) {
@@ -124,7 +124,7 @@ public class RestartServer {
}
private Set<URL> getMatchingUrls(Set<URL> urls, String sourceFolder) {
Set<URL> matchingUrls = new LinkedHashSet<URL>();
Set<URL> matchingUrls = new LinkedHashSet<>();
for (URL url : urls) {
if (this.sourceFolderUrlFilter.isMatch(sourceFolder, url)) {
if (logger.isDebugEnabled()) {
@@ -138,7 +138,7 @@ public class RestartServer {
}
private Set<URL> getClassLoaderUrls() {
Set<URL> urls = new LinkedHashSet<URL>();
Set<URL> urls = new LinkedHashSet<>();
ClassLoader classLoader = this.classLoader;
while (classLoader != null) {
if (classLoader instanceof URLClassLoader) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,9 +47,9 @@ public class DevToolsSettings {
private static DevToolsSettings settings;
private final List<Pattern> restartIncludePatterns = new ArrayList<Pattern>();
private final List<Pattern> restartIncludePatterns = new ArrayList<>();
private final List<Pattern> restartExcludePatterns = new ArrayList<Pattern>();
private final List<Pattern> restartExcludePatterns = new ArrayList<>();
DevToolsSettings() {
}
@@ -62,7 +62,7 @@ public class DevToolsSettings {
}
private Map<String, Pattern> getPatterns(Map<?, ?> properties, String prefix) {
Map<String, Pattern> patterns = new LinkedHashMap<String, Pattern>();
Map<String, Pattern> patterns = new LinkedHashMap<>();
for (Map.Entry<?, ?> entry : properties.entrySet()) {
String name = String.valueOf(entry.getKey());
if (name.startsWith(prefix)) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
*/
class TunnelClientListeners {
private final List<TunnelClientListener> listeners = new CopyOnWriteArrayList<TunnelClientListener>();
private final List<TunnelClientListener> listeners = new CopyOnWriteArrayList<>();
public void addListener(TunnelClientListener listener) {
Assert.notNull(listener, "Listener must not be null");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public class HttpTunnelPayloadForwarder {
private static final int MAXIMUM_QUEUE_SIZE = 100;
private final Map<Long, HttpTunnelPayload> queue = new HashMap<Long, HttpTunnelPayload>();
private final Map<Long, HttpTunnelPayload> queue = new HashMap<>();
private final Object monitor = new Object();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -227,7 +227,7 @@ public class HttpTunnelServer {
public ServerThread(ByteChannel targetServer) {
Assert.notNull(targetServer, "TargetServer must not be null");
this.targetServer = targetServer;
this.httpConnections = new ArrayDeque<HttpConnection>(2);
this.httpConnections = new ArrayDeque<>(2);
this.payloadForwarder = new HttpTunnelPayloadForwarder(targetServer);
}