diff options
author | David Gageot <david@gageot.net> | 2012-05-23 22:27:10 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-05-23 22:34:46 +0200 |
commit | 01dd8cde2c85c6f2c87eb9798fd2cc6020302ed3 (patch) | |
tree | 301788914ab32e4a2a972716c0ed8db8ac844294 /sonar-plugin-api | |
parent | fe9e4f3eea867948e25642c24d0ff376907a3f2a (diff) | |
download | sonarqube-01dd8cde2c85c6f2c87eb9798fd2cc6020302ed3.tar.gz sonarqube-01dd8cde2c85c6f2c87eb9798fd2cc6020302ed3.zip |
Remove warnings
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 5 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java index 1f2eedc3631..16cb667c5ef 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java @@ -157,7 +157,7 @@ public class BatchExtensionDictionnary { protected List evaluateAnnotatedClasses(Object extension, Class annotation) { - List results = Lists.newArrayList(); + List<Object> results = Lists.newArrayList(); Class aClass = extension.getClass(); while (aClass != null) { evaluateClass(aClass, annotation, results); @@ -174,7 +174,7 @@ public class BatchExtensionDictionnary { return results; } - private void evaluateClass(Class extensionClass, Class annotationClass, List results) { + private void evaluateClass(Class extensionClass, Class annotationClass, List<Object> results) { Annotation annotation = extensionClass.getAnnotation(annotationClass); if (annotation != null) { if (annotation.annotationType().isAssignableFrom(DependsUpon.class)) { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java index 4e04916761e..a8124545795 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java @@ -28,6 +28,7 @@ import org.sonar.api.utils.KeyValueFormat; import org.sonar.api.utils.SonarException; import java.util.Arrays; +import java.util.Collections; import java.util.Map; import java.util.Set; @@ -190,7 +191,7 @@ public class RangeDistributionBuilder implements MeasureBuilder { countBag.clear(); } if (bottomLimits != null) { - countBag.addAll(Arrays.asList(bottomLimits)); + Collections.addAll(countBag, bottomLimits); } isEmpty = true; } diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DeprecatedKeyValueFormatTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DeprecatedKeyValueFormatTest.java index 9526b65d7fb..a4da99c7e84 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DeprecatedKeyValueFormatTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DeprecatedKeyValueFormatTest.java @@ -62,7 +62,7 @@ public class DeprecatedKeyValueFormatTest { @Test public void formatMultiset() { - Multiset set = TreeMultiset.create(); + Multiset<String> set = TreeMultiset.create(); set.add("hello", 1); set.add("key", 3); assertThat(KeyValueFormat.format(set), is("hello=1;key=3")); |