diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-05 10:21:51 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-05 10:26:43 +0200 |
commit | 42bd0823e16c36baf43906be7ed12a5450ac2ff2 (patch) | |
tree | f1371fa14f242960ad3015672dfe45a2bd80abfe /sonar-plugin-api | |
parent | a36c9aaa524d7f13ed6b7fe710a52b9a1caeb296 (diff) | |
download | sonarqube-42bd0823e16c36baf43906be7ed12a5450ac2ff2.tar.gz sonarqube-42bd0823e16c36baf43906be7ed12a5450ac2ff2.zip |
Fix quality flaws
Diffstat (limited to 'sonar-plugin-api')
4 files changed, 6 insertions, 6 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java index 8c214218206..8cd7322115e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java @@ -191,7 +191,7 @@ public class StaxParser { return inputToCheck.skip(n); } - private void checkBufferForISOControlChars(byte[] buffer, int off, int len) { + private static void checkBufferForISOControlChars(byte[] buffer, int off, int len) { for (int i = off; i < len; i++) { char streamChar = (char) buffer[i]; if (Character.isISOControl(streamChar) && streamChar != '\n') { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java index dfe44fabf42..e1eb3255844 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/command/CommandExecutor.java @@ -121,7 +121,7 @@ public class CommandExecutor { } } - private void verifyGobbler(Command command, StreamGobbler gobbler, String type) { + private static void verifyGobbler(Command command, StreamGobbler gobbler, String type) { if (gobbler.getException() != null) { throw new CommandException(command, "Error inside " + type + " stream", gobbler.getException()); } @@ -140,7 +140,7 @@ public class CommandExecutor { return execute(command, new DefaultConsumer(), new DefaultConsumer(), timeoutMilliseconds); } - private void closeStreams(@Nullable Process process) { + private static void closeStreams(@Nullable Process process) { if (process != null) { IOUtils.closeQuietly(process.getInputStream()); IOUtils.closeQuietly(process.getOutputStream()); @@ -148,7 +148,7 @@ public class CommandExecutor { } } - private void waitUntilFinish(@Nullable StreamGobbler thread) { + private static void waitUntilFinish(@Nullable StreamGobbler thread) { if (thread != null) { try { thread.join(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java index ccec2fabb6c..47b90b75852 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java @@ -382,7 +382,7 @@ public class JsonWriter { } } - private IllegalStateException rethrow(Exception e) { + private static IllegalStateException rethrow(Exception e) { // stacktrace is not helpful throw new WriterException("Fail to write JSON: " + e.getMessage()); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java index 2744d4e01a3..7b8cf46034f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java @@ -176,7 +176,7 @@ public class XmlWriter { } } - private IllegalStateException rethrow(XMLStreamException e) { + private static IllegalStateException rethrow(XMLStreamException e) { // stacktrace is not helpful throw new IllegalStateException("Fail to write XML: " + e.getMessage()); } |