diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java b/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java
index 986f957bab77..3ea020171f0a 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java
@@ -129,19 +129,6 @@ public void stop() {
}
}
- private void stopAwait() {
- stopAwait = true;
- Thread t = awaitThread.get();
- if (t != null) {
- t.interrupt();
- try {
- t.join(1000);
- } catch (InterruptedException e) {
- // Ignored
- }
- }
- }
-
private class CeMainThread extends Thread {
private static final int CHECK_FOR_STOP_DELAY = 50;
private volatile boolean stop = false;
@@ -227,6 +214,19 @@ public void stopIt() {
// interrupt current thread in case its waiting for WebServer
interrupt();
}
+
+ private void stopAwait() {
+ stopAwait = true;
+ Thread t = awaitThread.get();
+ if (t != null) {
+ t.interrupt();
+ try {
+ t.join(1000);
+ } catch (InterruptedException e) {
+ // Ignored
+ }
+ }
+ }
}
}
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/app/CeServerTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/app/CeServerTest.java
index 62e5382cfb15..c863a9a8da36 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/app/CeServerTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/app/CeServerTest.java
@@ -28,7 +28,6 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.junit.rules.TemporaryFolder;
import org.junit.rules.Timeout;
import org.mockito.Mockito;
import org.sonar.ce.ComputeEngine;
@@ -44,8 +43,6 @@ public class CeServerTest {
public Timeout timeout = Timeout.seconds(50);
@Rule
public ExpectedException expectedException = ExpectedException.none();
- @Rule
- public TemporaryFolder temp = new TemporaryFolder();
private CeServer underTest = null;
private Thread waitingThread = null;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/AllProcessesCommands.java b/server/sonar-process/src/main/java/org/sonar/process/AllProcessesCommands.java
index d22a6ba10509..a3b0b8364c99 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/AllProcessesCommands.java
+++ b/server/sonar-process/src/main/java/org/sonar/process/AllProcessesCommands.java
@@ -52,8 +52,10 @@
*
* - First byte contains {@link #EMPTY} until process is UP and writes {@link #UP}
* - Second byte contains {@link #EMPTY} until any process requests current one to stop by writing value {@link #STOP}
- * - Third byte contains {@link #EMPTY} until any process requests current one to restart by writing value {@link #RESTART}. Process acknowledges restart by writing back {@link #EMPTY}
- * - Fourth byte will always contain {@link #EMPTY} unless process declares that it is operational by writing {@link #OPERATIONAL}. This does not imply that is done starting.
+ * - Third byte contains {@link #EMPTY} until any process requests current one to restart by writing value {@link #RESTART}.
+ * Process acknowledges restart by writing back {@link #EMPTY}
+ * - Fourth byte will always contain {@link #EMPTY} unless process declares that it is operational by writing {@link #OPERATIONAL}.
+ * This does not imply that is done starting.
* - The next 8 bytes contains a long (value of {@link System#currentTimeMillis()}) which represents the date of the last ping
*
*
@@ -76,7 +78,7 @@ public class AllProcessesCommands {
private static final byte UP = (byte) 0x01;
private static final byte EMPTY = (byte) 0x00;
- //VisibleForTesting
+ // VisibleForTesting
final MappedByteBuffer mappedByteBuffer;
private final RandomAccessFile sharedMemory;
diff --git a/server/sonar-server/src/main/java/org/sonar/ce/taskprocessor/ReportTaskProcessorDeclaration.java b/server/sonar-server/src/main/java/org/sonar/ce/taskprocessor/ReportTaskProcessorDeclaration.java
index af2f851fa17a..0ac461f6521f 100644
--- a/server/sonar-server/src/main/java/org/sonar/ce/taskprocessor/ReportTaskProcessorDeclaration.java
+++ b/server/sonar-server/src/main/java/org/sonar/ce/taskprocessor/ReportTaskProcessorDeclaration.java
@@ -39,6 +39,6 @@ public Set getHandledCeTaskTypes() {
@Override
public CeTaskResult process(CeTask task) {
- throw new UnsupportedOperationException("process must not be called in WebServer");
+ throw new UnsupportedOperationException("process must not be called in WebServer");
}
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/qualitygate/EvaluationResultTextConverterImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/qualitygate/EvaluationResultTextConverterImpl.java
index 8909c1e5f304..b7fc99d1ce22 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/qualitygate/EvaluationResultTextConverterImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/qualitygate/EvaluationResultTextConverterImpl.java
@@ -75,7 +75,7 @@ private String getAlertLabel(Condition condition, Measure.Level level) {
stringBuilder.append(metric);
if (alertPeriod != null && !condition.getMetric().getKey().startsWith(VARIATION_METRIC_PREFIX)) {
- String variation = i18n.message(Locale.ENGLISH, VARIATION, VARIATION).toLowerCase();
+ String variation = i18n.message(Locale.ENGLISH, VARIATION, VARIATION).toLowerCase(Locale.ENGLISH);
stringBuilder.append(" ").append(variation);
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeWorkerCallableImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeWorkerCallableImpl.java
index b0c0e599b883..11c84800166d 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeWorkerCallableImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeWorkerCallableImpl.java
@@ -22,13 +22,12 @@
import com.google.common.base.Optional;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.ce.taskprocessor.CeTaskProcessor;
-import org.sonar.core.util.logs.Profiler;
-import org.sonar.db.ce.CeActivityDto;
import org.sonar.ce.log.CeLogging;
-import org.sonar.ce.queue.CeQueue;
import org.sonar.ce.queue.CeTask;
import org.sonar.ce.queue.CeTaskResult;
+import org.sonar.ce.taskprocessor.CeTaskProcessor;
+import org.sonar.core.util.logs.Profiler;
+import org.sonar.db.ce.CeActivityDto;
import org.sonar.server.computation.queue.InternalCeQueue;
import static java.lang.String.format;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartActionTest.java
index 082da463f46f..8d08facfdf56 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/RestartActionTest.java
@@ -22,7 +22,6 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.junit.rules.TemporaryFolder;
import org.sonar.api.config.Settings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
@@ -44,8 +43,6 @@ public class RestartActionTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public TemporaryFolder temp = new TemporaryFolder();
- @Rule
public LogTester logTester = new LogTester();
private Settings settings = new Settings();