aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process-monitor/src
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-05-12 10:42:31 +0200
committerDavid Gageot <david@gageot.net>2015-05-12 14:33:41 +0200
commit7d5701e0a327448484ccee968e12ae3d9162d407 (patch)
tree48765dedbd2125480a531d71e30801ee44d8bce9 /server/sonar-process-monitor/src
parent4bab89867b0484fa9d21d0d54e6d7687d2b2f5bf (diff)
downloadsonarqube-7d5701e0a327448484ccee968e12ae3d9162d407.tar.gz
sonarqube-7d5701e0a327448484ccee968e12ae3d9162d407.zip
Useless code
Diffstat (limited to 'server/sonar-process-monitor/src')
-rw-r--r--server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaCommand.java8
-rw-r--r--server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java2
-rw-r--r--server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java4
3 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaCommand.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaCommand.java
index d4b774cb851..baeb769d337 100644
--- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaCommand.java
+++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaCommand.java
@@ -39,18 +39,18 @@ public class JavaCommand {
private File workDir;
// for example -Xmx1G
- private final List<String> javaOptions = new ArrayList<String>();
+ private final List<String> javaOptions = new ArrayList<>();
// entry point
private String className;
// relative path to JAR files
- private final List<String> classpath = new ArrayList<String>();
+ private final List<String> classpath = new ArrayList<>();
// program arguments (parameters of main(String[])
- private final Map<String, String> arguments = new LinkedHashMap<String, String>();
+ private final Map<String, String> arguments = new LinkedHashMap<>();
- private final Map<String, String> envVariables = new HashMap<String, String>(System.getenv());
+ private final Map<String, String> envVariables = new HashMap<>(System.getenv());
private File tempDir = null;
diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java
index dd67a10489d..1e3ee06648e 100644
--- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java
+++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java
@@ -64,7 +64,7 @@ public class JavaProcessLauncher {
}
private ProcessBuilder create(JavaCommand javaCommand) {
- List<String> commands = new ArrayList<String>();
+ List<String> commands = new ArrayList<>();
commands.add(buildJavaPath());
commands.addAll(javaCommand.getJavaOptions());
// TODO warning - does it work if temp dir contains a whitespace ?
diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java
index fd546b9df5d..df3d53518ee 100644
--- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java
+++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java
@@ -30,7 +30,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class Monitor {
- private final List<ProcessRef> processes = new CopyOnWriteArrayList<ProcessRef>();
+ private final List<ProcessRef> processes = new CopyOnWriteArrayList<>();
private final TerminatorThread terminator;
private final JavaProcessLauncher launcher;
private final Lifecycle lifecycle = new Lifecycle();
@@ -39,7 +39,7 @@ public class Monitor {
private Thread shutdownHook = new Thread(new MonitorShutdownHook(), "Monitor Shutdown Hook");
// used by awaitStop() to block until all processes are shutdown
- private final List<WatcherThread> watcherThreads = new CopyOnWriteArrayList<WatcherThread>();
+ private final List<WatcherThread> watcherThreads = new CopyOnWriteArrayList<>();
static int nextProcessId = 0;
Monitor(JavaProcessLauncher launcher, SystemExit exit, TerminatorThread terminator) {