summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-09-01 13:48:59 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-09-01 13:48:59 +0200
commitcf818e127b54dbb9791e206874146c62b680a3f9 (patch)
treeb3b87485ac2b2779488bc3b6ed650298784bf4c1
parentcb005882b404e49ea7f2a5a9c7f06c3c9f7038b2 (diff)
downloadsonarqube-cf818e127b54dbb9791e206874146c62b680a3f9.tar.gz
sonarqube-cf818e127b54dbb9791e206874146c62b680a3f9.zip
Fix some quality flaws
-rw-r--r--server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java5
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/SearchServer.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java4
3 files changed, 4 insertions, 7 deletions
diff --git a/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java b/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java
index 5251ca5bd0c..869867a6e34 100644
--- a/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java
+++ b/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java
@@ -73,6 +73,7 @@ public class ProcessWrapper extends Thread implements Terminable {
private StreamGobbler errorGobbler;
private StreamGobbler outputGobbler;
private ProcessMXBean processMXBean;
+ private final Object terminationLock = new Object();
public ProcessWrapper(String processName) {
super(processName);
@@ -179,9 +180,6 @@ public class ProcessWrapper extends Thread implements Terminable {
} catch (Exception e) {
LOGGER.info("ProcessThread has been interrupted. Killing node.");
LOGGER.trace("Process exception", e);
- } finally {
- ;
- ;
}
}
@@ -257,7 +255,6 @@ public class ProcessWrapper extends Thread implements Terminable {
return null;
}
- private final Integer terminationLock = new Integer(1);
@Override
public void terminate() {
synchronized (terminationLock) {
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
index 0fbb934c7c7..1abf733b66b 100644
--- a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
+++ b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
@@ -58,7 +58,7 @@ public class SearchServer extends MonitoredProcess {
private final boolean isBlocking;
private Node node;
- private final Integer lock = new Integer(1);
+ private final Object lock = new Object();
@VisibleForTesting
public SearchServer(final Props props, boolean monitored, boolean blocking) {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java b/server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java
index 3ed0a7118ca..4c8b26f4bae 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java
@@ -119,11 +119,11 @@ public class SearchClient extends TransportClient implements Startable {
@Override
public void start() {
-
+ // nothing to do
}
@Override
public void stop() {
- super.close();
+ close();
}
}