]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 3 Feb 2014 15:55:19 +0000 (16:55 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 3 Feb 2014 15:55:26 +0000 (16:55 +0100)
sonar-server/src/main/java/org/sonar/server/qualityprofile/ESActiveRule.java
sonar-server/src/main/webapp/javascripts/resource.js
sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleTagClient.java

index 3ee7b23f0dfac7809a9b70bd3611ff155bea8c76..4a1b9042e10dd108fb8a116cb76753ba2049d5e0 100644 (file)
@@ -136,13 +136,13 @@ public class ESActiveRule {
     } catch (IOException e) {
       bulkWatch.stop("Failed to indes active rules");
       throw new IllegalStateException("Unable to index active rules", e);
-    } finally {
     }
   }
 
   public void save(ActiveRuleDto activeRule, Collection<ActiveRuleParamDto> params) {
     try {
-      esIndex.putSynchronous(RuleRegistry.INDEX_RULES, ESActiveRule.TYPE_ACTIVE_RULE, Long.toString(activeRule.getId()), activeRuleDocument(activeRule, params), Long.toString(activeRule.getRulId()));
+      esIndex.putSynchronous(RuleRegistry.INDEX_RULES, ESActiveRule.TYPE_ACTIVE_RULE, Long.toString(activeRule.getId()), activeRuleDocument(activeRule, params),
+        Long.toString(activeRule.getRulId()));
     } catch (IOException ioexception) {
       throw new IllegalStateException("Unable to index active rule with id=" + activeRule.getId(), ioexception);
     }
index fbdcf590f2942443865c45568e40eb1c141985dc..04165488070ef897a0ba53d3d9c64154c3f22d99 100644 (file)
@@ -7,7 +7,8 @@ function loadResourceViewer(resourceId, tab, display_title, period, elt) {
     display_title = true;
   }
 
-  var url = baseUrl + '/resource/index/' + resourceId + '?tab=' + tab + '&display_title=' + display_title + '&period=' + period;
+  var url = baseUrl + '/resource/index/' + resourceId + '?tab=' + tab + '&display_title=' + display_title
+    + '&period=' + period;
   openAccordionItem(url, elt, true);
 
   return false;
@@ -16,7 +17,8 @@ function loadResourceViewer(resourceId, tab, display_title, period, elt) {
 // Display GWT component
 function loadGWT(gwtId, resourceId, resourceKey, resourceName, resourceScope, resourceQualifier, resourceLanguage) {
   config["resource"] = [
-    {"id":resourceId, "key":resourceKey, "name":resourceName, "scope":resourceScope, "qualifier":resourceQualifier, "lang":resourceLanguage}
+    {"id":resourceId, "key":resourceKey, "name":resourceName, "scope":resourceScope, "qualifier":resourceQualifier,
+      "lang":resourceLanguage}
   ];
   config["resource_key"] = resourceId;
   modules[gwtId]();
index 58bbfe72b6c635977c3c9db9ff3b8f2d2b18f3e0..52fed122c425e6bbc594fa824520bc0f8c118f83 100644 (file)
@@ -24,6 +24,7 @@ import org.sonar.wsclient.internal.HttpRequestFactory;
 import org.sonar.wsclient.rule.RuleTagClient;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -45,7 +46,7 @@ public class DefaultRuleTagClient implements RuleTagClient {
   @Override
   @SuppressWarnings("unchecked")
   public Collection<String> list() {
-    String json = requestFactory.get(LIST_URL, null);
+    String json = requestFactory.get(LIST_URL, Collections.<String, Object> emptyMap());
     return (Collection<String>) JSONValue.parse(json);
   }