diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-03-22 12:34:35 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-03-22 14:24:58 +0100 |
commit | eec3233505be2d6d9cc95c9bfc8359b91572ac51 (patch) | |
tree | 7a700eed9c8421e7ccb7ab9bd5aadda320948cd0 /server/sonar-ce | |
parent | 8c6e13559916396668b7ca453213016b951a39e2 (diff) | |
download | sonarqube-eec3233505be2d6d9cc95c9bfc8359b91572ac51.tar.gz sonarqube-eec3233505be2d6d9cc95c9bfc8359b91572ac51.zip |
fix quality flaws
Diffstat (limited to 'server/sonar-ce')
-rw-r--r-- | server/sonar-ce/src/main/java/org/sonar/ce/app/CeServer.java | 26 | ||||
-rw-r--r-- | server/sonar-ce/src/test/java/org/sonar/ce/app/CeServerTest.java | 3 |
2 files changed, 13 insertions, 16 deletions
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 986f957bab7..3ea020171f0 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 class CeServer implements Monitored { } } - 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 class CeServer implements Monitored { // 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 62e5382cfb1..c863a9a8da3 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.After; 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; |