diff options
author | Godin <mandrikov@gmail.com> | 2010-11-25 20:27:32 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-11-25 20:27:32 +0000 |
commit | 0b63c5a59ac2f160c5c7bc35d7f423f2a944e8ac (patch) | |
tree | b3b6d9377fc5baa81f12ed5299ca1a71bd0769cc /plugins/sonar-findbugs-plugin | |
parent | 9e6291e748bd2020d82989e8344f98305ee34b91 (diff) | |
download | sonarqube-0b63c5a59ac2f160c5c7bc35d7f423f2a944e8ac.tar.gz sonarqube-0b63c5a59ac2f160c5c7bc35d7f423f2a944e8ac.zip |
Fix violations reported on Nemo
Diffstat (limited to 'plugins/sonar-findbugs-plugin')
2 files changed, 7 insertions, 13 deletions
diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java index d4b8b70dd66..736043e1766 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java @@ -33,7 +33,7 @@ public final class FindbugsConstants { */ public static final String GENERATE_XML_KEY = "sonar.findbugs.generateXml"; public static final boolean GENERATE_XML_DEFAULT_VALUE = true; // TODO should be false - see SONAR-1880 - + private FindbugsConstants() { } } diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java index 397502c995f..a9cbc70a742 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java @@ -19,19 +19,14 @@ */ package org.sonar.plugins.findbugs.xml; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import com.thoughtworks.xstream.XStream; +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamImplicit; import org.apache.commons.lang.StringUtils; import org.sonar.api.rules.RulePriority; import org.sonar.plugins.findbugs.FindbugsLevelUtils; -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.annotations.XStreamAlias; -import com.thoughtworks.xstream.annotations.XStreamImplicit; +import java.util.*; @XStreamAlias("FindBugsFilter") public class FindBugsFilter { @@ -126,15 +121,14 @@ public class FindBugsFilter { return result; } - private void completeLevels(Map<String, RulePriority> result, List<Bug> bugs, Priority priority, FindbugsLevelUtils priorityMapper, - BugInfoSplitter splitter) { + private void completeLevels(Map<String, RulePriority> result, List<Bug> bugs, Priority priority, FindbugsLevelUtils priorityMapper, BugInfoSplitter splitter) { if (bugs == null) { return; } RulePriority rulePriority = getRulePriority(priority, priorityMapper); for (Bug bug : bugs) { String varToSplit = splitter.getVar(bug); - if ( !StringUtils.isBlank(varToSplit)) { + if (!StringUtils.isBlank(varToSplit)) { String[] splitted = StringUtils.split(varToSplit, splitter.getSeparator()); for (String code : splitted) { mapRulePriority(result, rulePriority, code); |