aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-11-07 00:06:37 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-11-07 00:26:32 +0400
commitba029cb715b4e6fba210ca48d73289b749165946 (patch)
tree8aa2c605465910164892856e245a4b1c1025f21f
parent3a61986c5815fda72fd97aff91d69e56e7364d1d (diff)
downloadsonarqube-ba029cb715b4e6fba210ca48d73289b749165946.tar.gz
sonarqube-ba029cb715b4e6fba210ca48d73289b749165946.zip
Fix violations
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java1
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java1
-rw-r--r--plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java24
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java1
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java1
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java2
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java1
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/UnmarshalException.java1
13 files changed, 12 insertions, 26 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java
index 4b13744f4a0..e603fb1f129 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java
@@ -32,7 +32,6 @@ import org.sonar.api.rules.RulePriority;
import org.sonar.api.rules.Violation;
import org.sonar.batch.components.PastSnapshot;
import org.sonar.batch.components.TimeMachineConfiguration;
-import org.sonar.core.NotDryRun;
import java.util.*;
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java
index a1c9d5236b1..cb10c34d886 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java
@@ -19,7 +19,6 @@
*/
package org.sonar.plugins.core.timemachine;
-import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java
index d6db5e209cc..d74f90c74cd 100644
--- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java
+++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java
@@ -23,24 +23,24 @@ import java.util.HashMap;
import java.util.Map;
public final class FindbugsCategory {
- private final static Map<String, String> findbugsToSonar = new HashMap<String, String>();
+ private final static Map<String, String> FINDBUGS_TO_SONAR = new HashMap<String, String>();
static {
- findbugsToSonar.put("BAD_PRACTICE", "Bad practice");
- findbugsToSonar.put("CORRECTNESS", "Correctness");
- findbugsToSonar.put("MT_CORRECTNESS", "Multithreaded correctness");
- findbugsToSonar.put("I18N", "Internationalization");
- findbugsToSonar.put("EXPERIMENTAL", "Experimental");
- findbugsToSonar.put("MALICIOUS_CODE", "Malicious code");
- findbugsToSonar.put("PERFORMANCE", "Performance");
- findbugsToSonar.put("SECURITY", "Security");
- findbugsToSonar.put("STYLE", "Style");
+ FINDBUGS_TO_SONAR.put("BAD_PRACTICE", "Bad practice");
+ FINDBUGS_TO_SONAR.put("CORRECTNESS", "Correctness");
+ FINDBUGS_TO_SONAR.put("MT_CORRECTNESS", "Multithreaded correctness");
+ FINDBUGS_TO_SONAR.put("I18N", "Internationalization");
+ FINDBUGS_TO_SONAR.put("EXPERIMENTAL", "Experimental");
+ FINDBUGS_TO_SONAR.put("MALICIOUS_CODE", "Malicious code");
+ FINDBUGS_TO_SONAR.put("PERFORMANCE", "Performance");
+ FINDBUGS_TO_SONAR.put("SECURITY", "Security");
+ FINDBUGS_TO_SONAR.put("STYLE", "Style");
}
public static String findbugsToSonar(String findbugsCategKey) {
- return findbugsToSonar.get(findbugsCategKey);
+ return FINDBUGS_TO_SONAR.get(findbugsCategKey);
}
private FindbugsCategory() {
}
-} \ No newline at end of file
+}
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java
index e73de853a8a..0fa8fd0e05b 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java
@@ -42,9 +42,7 @@ public class NoSonarFilterLoader extends Bridge {
@Override
public void onFile(SourceFile squidFile, Resource sonarFile) {
if (noSonarFilter != null) {
- // lines with NOSONAR tag
Set<Integer> ignoredLines = new HashSet<Integer>(squidFile.getNoSonarTagLines());
- // classes and methods with annotation SuppressWarnings
new SquidVisitorNotifier(squidFile, new SuppressWarningsVisitor(ignoredLines)).notifyVisitors();
noSonarFilter.addResource(sonarFile, ignoredLines);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
index a883995f26d..99d6ed5ee7d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
@@ -30,7 +30,6 @@ import org.sonar.batch.config.BatchSettingsEnhancer;
import org.sonar.jpa.session.DatabaseSessionProvider;
import org.sonar.jpa.session.DefaultDatabaseConnector;
import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
-import org.sonar.persistence.DefaultDatabase;
import org.sonar.persistence.MyBatis;
import org.sonar.persistence.dao.DaoUtils;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java
index a1f6c0643f8..fcfada54dee 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java
@@ -23,7 +23,6 @@ import org.apache.commons.lang.StringUtils;
import org.sonar.api.BatchExtension;
import org.sonar.api.Extension;
import org.sonar.api.batch.InstantiationStrategy;
-import org.sonar.api.batch.Purge;
import org.sonar.api.batch.SupportedEnvironment;
import org.sonar.api.utils.AnnotationUtils;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java b/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java
index 994625b1281..5b21a07ba5c 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java
@@ -23,7 +23,6 @@ import com.google.common.collect.Maps;
import org.apache.commons.lang.ObjectUtils;
import org.sonar.api.BatchExtension;
import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.ResourceModel;
import org.sonar.api.database.model.Snapshot;
import org.sonar.api.measures.Metric;
import org.sonar.api.measures.MetricFinder;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java
index 02068a0f9a7..bfd2f2c2edd 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java
@@ -34,7 +34,6 @@ import org.sonar.batch.components.PastSnapshot;
import org.sonar.batch.components.PastSnapshotFinder;
import javax.persistence.Query;
-import java.util.Collections;
import java.util.List;
public class TimeMachineConfiguration implements BatchExtension {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java b/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java
index aa5ca9873b9..396a5d3559d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java
@@ -33,7 +33,6 @@ import org.sonar.api.resources.Project;
import org.sonar.batch.MavenPluginExecutor;
import java.util.Collection;
-import java.util.List;
public class PostJobsExecutor implements BatchComponent {
private static final Logger LOG = LoggerFactory.getLogger(PostJobsExecutor.class);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java
index d81eab634fc..0fc68a49a4b 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java
@@ -21,7 +21,6 @@ package org.sonar.api.resources;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.api.database.BaseIdentifiable;
import org.sonar.api.database.model.ResourceModel;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
index f4ab32762df..c6aab0392fb 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
@@ -19,8 +19,6 @@
*/
package org.sonar.api.rules;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.sonar.api.resources.Resource;
import org.sonar.api.utils.Logs;
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
index ff9aed7ddd5..5d5efa9cab8 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
@@ -20,7 +20,6 @@
package org.sonar.wsclient.services;
import java.util.Date;
-import java.util.Locale;
/**
* @since 2.2
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/UnmarshalException.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/UnmarshalException.java
index 860356158b0..2bac0e0b456 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/UnmarshalException.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/UnmarshalException.java
@@ -20,7 +20,6 @@
package org.sonar.wsclient.unmarshallers;
import org.sonar.wsclient.services.AbstractQuery;
-import org.sonar.wsclient.services.Query;
/**
* @since 2.10