diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-11-03 15:34:10 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-11-03 15:34:18 +0100 |
commit | 1c87ee80aeefcac5ea4934a4b8d3ccdd20dfbde1 (patch) | |
tree | c416d3460d15e668a16d47acc09c5c867867e162 /plugins | |
parent | b0d440578ea601e2f3fdc3afe624cfb13a4aea51 (diff) | |
download | sonarqube-1c87ee80aeefcac5ea4934a4b8d3ccdd20dfbde1.tar.gz sonarqube-1c87ee80aeefcac5ea4934a4b8d3ccdd20dfbde1.zip |
Fix coding violations
Diffstat (limited to 'plugins')
7 files changed, 11 insertions, 4 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java index df4f66f9b04..883a7d41bf7 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java @@ -29,7 +29,7 @@ public class ApplyProjectRolesDecorator implements Decorator { private RoleManager roleManager; - protected ApplyProjectRolesDecorator(RoleManager roleManager) { + ApplyProjectRolesDecorator(RoleManager roleManager) { this.roleManager = roleManager; } diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java index a0b636d1481..330cf8fe365 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java @@ -55,7 +55,7 @@ public class WeightedViolationsDecorator implements Decorator { /** * for unit tests */ - protected WeightedViolationsDecorator(Map<RulePriority, Integer> weights) { + WeightedViolationsDecorator(Map<RulePriority, Integer> weights) { this.weights = weights; } diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java index ea49d64e485..adb577ed4df 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java @@ -61,6 +61,9 @@ public final class DefaultPurgeContext implements org.sonar.api.batch.PurgeConte return project; } + /** + * @deprecated + */ @Deprecated public Integer getLastSnapshotId() { return currentSid; diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java index 22047918857..412322fb779 100644 --- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java +++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java @@ -37,7 +37,7 @@ import org.sonar.wsclient.services.Resource; import java.util.List; -public class DependencyInfo extends Composite { +public final class DependencyInfo extends Composite { private static DependencyInfo INSTANCE = new DependencyInfo(); diff --git a/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JacocoAntInitializer.java b/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JacocoAntInitializer.java index e74e2a7a3c8..83584e2b123 100644 --- a/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JacocoAntInitializer.java +++ b/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JacocoAntInitializer.java @@ -26,6 +26,7 @@ import org.sonar.api.batch.SupportedEnvironment; import org.sonar.api.resources.Project; import java.util.Hashtable; +import java.util.Map; @SupportedEnvironment("ant") public class JacocoAntInitializer extends Initializer implements CoverageExtension { @@ -48,7 +49,7 @@ public class JacocoAntInitializer extends Initializer implements CoverageExtensi @Override public void execute(org.sonar.api.resources.Project project) { - Hashtable<String, Target> hastable = antProject.getTargets(); + Map<String, Target> hastable = antProject.getTargets(); String jvmArg = configuration.getJvmArgument(); String[] names = configuration.getAntTargets(); for (String name : names) { diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java index f46c399e9b4..8ecf0417a0d 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java @@ -25,4 +25,5 @@ import org.sonar.graph.Edge; import java.util.HashMap; public final class DependencyIndex extends HashMap<Edge, Dependency> { + private static final long serialVersionUID = -3915853089587077911L; } diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java index ba49a80d6de..dcb0a150e8e 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java @@ -39,6 +39,8 @@ import java.util.HashMap; public final class ResourceIndex extends HashMap<SourceCode, Resource> { + private static final long serialVersionUID = -918346378374943773L; + public ResourceIndex loadSquidResources(Squid squid, SensorContext context, Project project) { loadSquidProject(squid, project); loadSquidPackages(squid, context); |