From 70e645356d78d7b90f63bad4f40a343562d84d07 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Thu, 10 Feb 2011 00:08:27 +0100 Subject: Fix some violations --- .../main/java/org/sonar/api/checks/AnnotationCheckFactory.java | 8 ++++---- .../java/org/sonar/api/measures/RangeDistributionBuilder.java | 2 +- .../main/java/org/sonar/api/resources/ProjectFileSystem.java | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'sonar-plugin-api/src/main/java') 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 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 -- cgit v1.2.3