diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-09-23 11:16:04 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-09-24 20:03:10 +0000 |
commit | 215f8403a6c4a131b9592457fd95a280274237de (patch) | |
tree | 9412c0030b97b4e40563a882ababea60189270c6 /sonar-testing-harness | |
parent | 5377194709960576b1367a220c6ba20ce6f41ef0 (diff) | |
download | sonarqube-215f8403a6c4a131b9592457fd95a280274237de.tar.gz sonarqube-215f8403a6c4a131b9592457fd95a280274237de.zip |
Fix code quality issues
Diffstat (limited to 'sonar-testing-harness')
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/JsonComparison.java | 6 | ||||
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/JsonComparison.java b/sonar-testing-harness/src/main/java/org/sonar/test/JsonComparison.java index a12bc1f5ef4..98d49ec376a 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/JsonComparison.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/JsonComparison.java @@ -73,7 +73,7 @@ class JsonComparison { return compare(expectedJson, actualJson); } - private Object parse(String s) { + private static Object parse(String s) { try { JSONParser parser = new JSONParser(); return parser.parse(s); @@ -108,11 +108,11 @@ class JsonComparison { return compareBooleans((Boolean) expectedObject, (Boolean) actualObject); } - private boolean compareBooleans(Boolean expected, Boolean actual) { + private static boolean compareBooleans(Boolean expected, Boolean actual) { return expected.equals(actual); } - private boolean compareNumbers(Number expected, Number actual) { + private static boolean compareNumbers(Number expected, Number actual) { double d1 = expected.doubleValue(); double d2 = actual.doubleValue(); if (Double.compare(d1, d2) == 0) { diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java index fbb00f7ce5b..457ff104627 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java @@ -105,7 +105,7 @@ public class BundleSynchronizedMatcher extends BaseMatcher<String> { return details; } - private void print(String title, SortedMap<String, String> translations, StringBuilder to) { + private static void print(String title, SortedMap<String, String> translations, StringBuilder to) { if (!translations.isEmpty()) { to.append(title); for (Map.Entry<String, String> entry : translations.entrySet()) { |