diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-03-27 23:43:19 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-03-27 23:43:19 +0200 |
commit | d4ae5228bb668e65baa644b52d41286d5f3d55cd (patch) | |
tree | 8b3f18401fade28db31c1b9364e2f4ebad2b017d /plugins/sonar-cpd-plugin | |
parent | 2b560c35ab24a4f7db27d7e180a64e830b9a56a1 (diff) | |
download | sonarqube-d4ae5228bb668e65baa644b52d41286d5f3d55cd.tar.gz sonarqube-d4ae5228bb668e65baa644b52d41286d5f3d55cd.zip |
Fix coding violations
Diffstat (limited to 'plugins/sonar-cpd-plugin')
-rw-r--r-- | plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java index 3c64cd47ff4..4950b178270 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java @@ -19,11 +19,14 @@ */ package org.sonar.plugins.cpd; -import org.sonar.api.*; +import org.sonar.api.CoreProperties; +import org.sonar.api.Plugin; +import org.sonar.api.Properties; +import org.sonar.api.Property; import org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator; import org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator; -import java.util.ArrayList; +import java.util.Arrays; import java.util.List; @Properties({ @@ -36,14 +39,14 @@ import java.util.List; module = true, global = true), @Property( - key = CoreProperties.CPD_IGNORE_LITERALS_PROPERTY, - defaultValue = CoreProperties.CPD_IGNORE_LITERALS_DEFAULT_VALUE + "", - name = "Ignore literals", - description = "if true, CPD ignores literal value differences when evaluating a duplicate block. " + - "This means that foo=\"first string\"; and foo=\"second string\"; will be seen as equivalent.", - project = true, - module = true, - global = true), + key = CoreProperties.CPD_IGNORE_LITERALS_PROPERTY, + defaultValue = CoreProperties.CPD_IGNORE_LITERALS_DEFAULT_VALUE + "", + name = "Ignore literals", + description = "if true, CPD ignores literal value differences when evaluating a duplicate block. " + + "This means that foo=\"first string\"; and foo=\"second string\"; will be seen as equivalent.", + project = true, + module = true, + global = true), @Property( key = CoreProperties.CPD_IGNORE_IDENTIFIERS_PROPERTY, defaultValue = CoreProperties.CPD_IGNORE_IDENTIFIERS_DEFAULT_VALUE + "", @@ -75,12 +78,7 @@ public class CpdPlugin implements Plugin { return "Find duplicated source code within project."; } - public List<Class<? extends Extension>> getExtensions() { - List<Class<? extends Extension>> list = new ArrayList<Class<? extends Extension>>(); - list.add(CpdSensor.class); - list.add(SumDuplicationsDecorator.class); - list.add(DuplicationDensityDecorator.class); - list.add(JavaCpdMapping.class); - return list; + public List getExtensions() { + return Arrays.asList(CpdSensor.class, SumDuplicationsDecorator.class, DuplicationDensityDecorator.class, JavaCpdMapping.class); } }
\ No newline at end of file |