From fff73903632519aa70356279a77e8cae2e50db05 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 12 May 2017 16:03:49 +0200 Subject: [PATCH] Fix Quality flaws --- sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java | 2 +- .../org/sonar/api/batch/fs/internal/TestInputFileBuilder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.39.5