summaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-12-09 09:34:43 -0600
committerSonarTech <sonartech@sonarsource.com>2019-12-10 20:46:09 +0100
commitd1fd889554bccbb50122550899dbb66b90b04f78 (patch)
tree9cad838366292ee79b77ac3513403f7489b06355 /sonar-testing-harness/src
parentf86a1094588e4e47b3abf612891af0431653cd0e (diff)
downloadsonarqube-d1fd889554bccbb50122550899dbb66b90b04f78.tar.gz
sonarqube-d1fd889554bccbb50122550899dbb66b90b04f78.zip
Fix code quality issues and reduce dependency on Guava
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/JsonComparison.java4
-rw-r--r--sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java2
2 files changed, 3 insertions, 3 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 ac797e2c067..995753269df 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
@@ -42,7 +42,7 @@ class JsonComparison {
private boolean strictTimezone = false;
private boolean strictArrayOrder = false;
- private Set<String> ignoredFields = synchronizedSet(new HashSet<String>());
+ private Set<String> ignoredFields = synchronizedSet(new HashSet<>());
boolean isStrictTimezone() {
return strictTimezone;
@@ -196,7 +196,7 @@ class JsonComparison {
}
private boolean shouldIgnoreField(Object key) {
- return key instanceof String && ignoredFields.contains((String) key);
+ return key instanceof String && ignoredFields.contains(key);
}
@CheckForNull
diff --git a/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java b/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java
index ca1ee476dc2..a460b2e7bb4 100644
--- a/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java
+++ b/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java
@@ -104,7 +104,7 @@ public class BundleSynchronizedMatcherTest {
}
@Test
- public void testExtractDefaultBundleName() throws Exception {
+ public void testExtractDefaultBundleName() {
// OK
assertThat(BundleSynchronizedMatcher.extractDefaultBundleName("myPlugin_fr.properties"), is("myPlugin.properties"));
assertThat(BundleSynchronizedMatcher.extractDefaultBundleName("myPlugin_fr_QB.properties"), is("myPlugin.properties"));