From: Simon Brandhof Date: Fri, 12 May 2017 14:03:49 +0000 (+0200) Subject: Fix Quality flaws X-Git-Tag: 6.4-RC1~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fff73903632519aa70356279a77e8cae2e50db05;p=sonarqube.git Fix Quality flaws --- diff --git a/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java b/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java index 75e135919ee..116d2c1c2a4 100644 --- a/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java +++ b/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java @@ -210,7 +210,7 @@ public class DefaultI18n implements I18n, Startable { return result; } - private String readInputStream(String filePath, InputStream input) { + private static String readInputStream(String filePath, InputStream input) { String result; try { result = IOUtils.toString(input, "UTF-8"); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java index e1ec36d37b7..6fc584fdfbc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/TestInputFileBuilder.java @@ -112,7 +112,7 @@ public class TestInputFileBuilder { public TestInputFileBuilder setModuleBaseDir(Path moduleBaseDir) { try { - this.moduleBaseDir = moduleBaseDir.normalize().toRealPath(new LinkOption[] {LinkOption.NOFOLLOW_LINKS}); + this.moduleBaseDir = moduleBaseDir.normalize().toRealPath(LinkOption.NOFOLLOW_LINKS); } catch (IOException e) { this.moduleBaseDir = moduleBaseDir.normalize(); }