]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Dec 2013 12:21:48 +0000 (13:21 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Dec 2013 12:21:48 +0000 (13:21 +0100)
sonar-batch/src/main/java/org/sonar/batch/scan/report/JsonReport.java
sonar-server/src/main/java/org/sonar/server/rule/RubyRuleService.java

index 992fb82ae91a6db04f7cefcb717b522c44a0855c..cca87185e97b6f8d069634367bd24a36b868eca7 100644 (file)
@@ -40,16 +40,10 @@ import org.sonar.batch.bootstrap.AnalysisMode;
 import org.sonar.batch.events.BatchStepEvent;
 import org.sonar.batch.events.EventBus;
 import org.sonar.batch.issue.IssueCache;
-import org.sonar.core.i18n.RuleI18nManager;
 
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
+import java.io.*;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Locale;
 import java.util.Set;
 
 import static com.google.common.collect.Sets.newHashSet;
@@ -72,13 +66,13 @@ public class JsonReport implements BatchComponent {
   private UserFinder userFinder;
 
   public JsonReport(Settings settings, ModuleFileSystem fileSystem, Server server, RuleFinder ruleFinder, IssueCache issueCache,
-    EventBus eventBus, ComponentSelectorFactory componentSelectorFactory, AnalysisMode mode, UserFinder userFinder) {
+                    EventBus eventBus, ComponentSelectorFactory componentSelectorFactory, AnalysisMode mode, UserFinder userFinder) {
     this(settings, fileSystem, server, ruleFinder, issueCache, eventBus, componentSelectorFactory.create(), mode, userFinder);
   }
 
   @VisibleForTesting
   JsonReport(Settings settings, ModuleFileSystem fileSystem, Server server, RuleFinder ruleFinder, IssueCache issueCache,
-    EventBus eventBus, ComponentSelector componentSelector, AnalysisMode analysisMode, UserFinder userFinder) {
+             EventBus eventBus, ComponentSelector componentSelector, AnalysisMode analysisMode, UserFinder userFinder) {
     this.settings = settings;
     this.fileSystem = fileSystem;
     this.server = server;
index 639225b712437f2be46ea803de02402056827450..59756fa892aeff1a40d0dced946b0d7de4d06646 100644 (file)
@@ -23,11 +23,8 @@ import com.google.common.collect.Maps;
 import org.apache.commons.lang.StringUtils;
 import org.picocontainer.Startable;
 import org.sonar.api.ServerComponent;
-import org.sonar.api.rules.Rule;
 import org.sonar.core.i18n.RuleI18nManager;
 
-import javax.annotation.CheckForNull;
-
 import java.util.Map;
 
 /**
@@ -60,7 +57,7 @@ public class RubyRuleService implements ServerComponent, Startable {
   }
 
   private static void translateNonBlankKey(Map<String, String> options, Map<String, String> params, String optionKey, String paramKey) {
-    if(options.get(optionKey) != null && StringUtils.isNotBlank(options.get(optionKey).toString())) {
+    if (options.get(optionKey) != null && StringUtils.isNotBlank(options.get(optionKey).toString())) {
       params.put(paramKey, options.get(optionKey).toString());
     }
   }