aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-02-10 00:08:27 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-02-10 00:08:27 +0100
commit70e645356d78d7b90f63bad4f40a343562d84d07 (patch)
tree441999668293390ab36ba76a496321338b4fe895 /sonar-plugin-api/src/main/java
parentbd8e08f07709d404d40c5c06096824669bca3ac7 (diff)
downloadsonarqube-70e645356d78d7b90f63bad4f40a343562d84d07.tar.gz
sonarqube-70e645356d78d7b90f63bad4f40a343562d84d07.zip
Fix some violations
Diffstat (limited to 'sonar-plugin-api/src/main/java')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java10
3 files changed, 11 insertions, 9 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java
index c7cabc3751c..017ab98ac34 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java
@@ -123,16 +123,16 @@ public final class AnnotationCheckFactory extends CheckFactory {
field.setByte(check, Byte.parseByte(value));
} else if (field.getType().equals(Integer.class)) {
- field.set(check, new Integer(Integer.parseInt(value)));
+ field.set(check, Integer.parseInt(value));
} else if (field.getType().equals(Long.class)) {
- field.set(check, new Long(Long.parseLong(value)));
+ field.set(check, Long.parseLong(value));
} else if (field.getType().equals(Double.class)) {
- field.set(check, new Double(Double.parseDouble(value)));
+ field.set(check, Double.parseDouble(value));
} else if (field.getType().equals(Boolean.class)) {
- field.set(check, Boolean.valueOf(Boolean.parseBoolean(value)));
+ field.set(check, Boolean.parseBoolean(value));
} else {
throw new SonarException("The type of the field " + field + " is not supported: " + field.getType());
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 93bbe04e9e5..953f2cad00b 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
@@ -77,7 +77,7 @@ public class RangeDistributionBuilder implements MeasureBuilder {
}
if (onlyInts) {
for (int i=0 ; i<bottomLimits.length ; i++) {
- bottomLimits[i] = new Integer(bottomLimits[i].intValue());
+ bottomLimits[i] = bottomLimits[i].intValue();
}
}
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java
index 4bba4c02788..de5bd42d4cc 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java
@@ -64,6 +64,7 @@ public interface ProjectFileSystem extends BatchComponent {
* @deprecated since 2.6 - ProjectFileSystem should be immutable
* See http://jira.codehaus.org/browse/SONAR-2126
*/
+ @Deprecated
ProjectFileSystem addSourceDir(File dir);
/**
@@ -78,6 +79,7 @@ public interface ProjectFileSystem extends BatchComponent {
* @deprecated since 2.6 - ProjectFileSystem should be immutable
* See http://jira.codehaus.org/browse/SONAR-2126
*/
+ @Deprecated
ProjectFileSystem addTestDir(File dir);
/**
@@ -100,7 +102,7 @@ public interface ProjectFileSystem extends BatchComponent {
* Source files, excluding unit tests and files matching project exclusion patterns.
*
* @param langs language filter. Check all files, whatever their language, if null or empty.
- * @deprecated since 2.6 use {@link #mainFiles(Language...)} instead.
+ * @deprecated since 2.6 use {@link #mainFiles(String...)} instead.
* See http://jira.codehaus.org/browse/SONAR-2126
*/
@Deprecated
@@ -109,7 +111,7 @@ public interface ProjectFileSystem extends BatchComponent {
/**
* Java source files, excluding unit tests and files matching project exclusion patterns. Shortcut for getSourceFiles(Java.INSTANCE)
*
- * @deprecated since 2.6 use {@link #mainFiles(Language...)} instead.
+ * @deprecated since 2.6 use {@link #mainFiles(String...)} instead.
* See http://jira.codehaus.org/browse/SONAR-2126
*/
@Deprecated
@@ -126,7 +128,7 @@ public interface ProjectFileSystem extends BatchComponent {
/**
* Unit test files, excluding files matching project exclusion patterns.
*
- * @deprecated since 2.6 use {@link #testFiles(Language...)} instead.
+ * @deprecated since 2.6 use {@link #testFiles(String...)} instead.
* See http://jira.codehaus.org/browse/SONAR-2126
*/
@Deprecated
@@ -160,7 +162,7 @@ public interface ProjectFileSystem extends BatchComponent {
List<InputFile> mainFiles(String... langs);
/**
- * TODO comment me
+ * Source files of unit tests. Exclusion patterns are not applied.
*
* @param langs language filter. If null or empty, will return empty list
* @since 2.6