From 079096f44a4a5aed828d936e87596bef604303ce Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 23 Feb 2015 23:26:35 +0100 Subject: Fix quality flaws --- .../src/main/java/org/sonar/process/LogbackHelper.java | 2 +- .../src/main/java/org/sonar/process/ProcessCommands.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'server/sonar-process') diff --git a/server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java b/server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java index 7fce2ffa786..cb9bb6a8080 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java +++ b/server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java @@ -110,7 +110,7 @@ public class LogbackHelper { } } - public static abstract class RollingPolicy { + public abstract static class RollingPolicy { protected final Context context; protected final String filenamePrefix; protected final File logsDir; diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java index 14405940d67..d697f542f32 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java @@ -64,7 +64,10 @@ public class ProcessCommands { private final RandomAccessFile sharedMemory; private static final int MAX_PROCESSES = 50; private static final int BYTE_LENGTH_FOR_ONE_PROCESS = 1 + 1 + 8; - private static final int MAX_SHARED_MEMORY = BYTE_LENGTH_FOR_ONE_PROCESS * MAX_PROCESSES; // With this shared memory we can handle up to MAX_PROCESSES processes + + // With this shared memory we can handle up to MAX_PROCESSES processes + private static final int MAX_SHARED_MEMORY = BYTE_LENGTH_FOR_ONE_PROCESS * MAX_PROCESSES; + public static final byte STOP = (byte) 0xFF; public static final byte READY = (byte) 0x01; public static final byte EMPTY = (byte) 0x00; @@ -150,7 +153,7 @@ public class ProcessCommands { } } - public static final int getMaxProcesses() { + public static int getMaxProcesses() { return MAX_PROCESSES; } -} \ No newline at end of file +} -- cgit v1.2.3