]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 26 Aug 2014 11:55:50 +0000 (13:55 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 26 Aug 2014 14:03:05 +0000 (16:03 +0200)
server/process/sonar-process/src/main/java/org/sonar/process/AesCipher.java
server/process/sonar-process/src/main/java/org/sonar/process/Monitor.java
server/process/sonar-process/src/main/java/org/sonar/process/MonitoredProcess.java
server/process/sonar-process/src/main/java/org/sonar/process/ProcessLogging.java

index 11d69a805c154785d814bc16631283153f02f00f..204ae1a6b6b059445ec1e3f3e246f655e5d6cddd 100644 (file)
@@ -62,7 +62,7 @@ final class AesCipher implements Cipher {
     } catch (RuntimeException e) {
       throw e;
     } catch (Exception e) {
-      throw new RuntimeException(e);
+      throw new IllegalStateException(e);
     }
   }
 
@@ -76,7 +76,7 @@ final class AesCipher implements Cipher {
     } catch (RuntimeException e) {
       throw e;
     } catch (Exception e) {
-      throw new RuntimeException(e);
+      throw new IllegalStateException(e);
     }
   }
 
index f1891535b3759eaf7c5e180073877fbe004804bd..663fb3cbcfc1f59b5073344d6574da24bab5ad9f 100644 (file)
@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
 
 public class Monitor extends Thread implements Terminable {
 
-  private final static Logger LOGGER = LoggerFactory.getLogger(Monitor.class);
+  private static final Logger LOGGER = LoggerFactory.getLogger(Monitor.class);
 
   private static final long PING_DELAY_MS = 3000L;
 
index 0724ef4225828a34be4737a14572cddec31e585c..d9187c3e6d40d674a0b7492773cadf4ba82623b8 100644 (file)
@@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit;
 
 public abstract class MonitoredProcess implements ProcessMXBean {
 
-  private final static Logger LOGGER = LoggerFactory.getLogger(MonitoredProcess.class);
+  private static final Logger LOGGER = LoggerFactory.getLogger(MonitoredProcess.class);
 
   private static final long AUTOKILL_TIMEOUT_MS = 30000L;
   private static final long AUTOKILL_CHECK_DELAY_MS = 2000L;
index 40b336bbc0b42ff6f54bef16153f17f6df6d74e1..6b2e49e55fd4626dce434ef4e9a5bc37dbc41d41 100644 (file)
@@ -37,7 +37,7 @@ public class ProcessLogging {
       context.reset();
       context.putProperty(PATH_LOGS_PROPERTY, props.of(PATH_LOGS_PROPERTY));
       doConfigure(configurator, logbackXmlResource);
-    } catch (JoranException je) {
+    } catch (JoranException ignored) {
       // StatusPrinter will handle this
     }
     StatusPrinter.printInCaseOfErrorsOrWarnings(context);