]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 8 Dec 2014 16:38:24 +0000 (17:38 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 8 Dec 2014 16:38:24 +0000 (17:38 +0100)
server/sonar-server/src/main/java/org/sonar/server/search/request/ProxyClusterStatsRequestBuilder.java
server/sonar-server/src/main/java/org/sonar/server/search/request/ProxySearchScrollRequestBuilder.java
server/sonar-server/src/main/java/org/sonar/server/source/ws/ShowAction.java

index cba4108d9f0e604050f1b058dd5dc4a2a69ca6d5..3a2ba514026ebeb41b85778409167d71eceddfdf 100644 (file)
@@ -28,7 +28,6 @@ import org.elasticsearch.client.Client;
 import org.elasticsearch.common.unit.TimeValue;
 import org.sonar.core.profiling.Profiling;
 import org.sonar.core.profiling.StopWatch;
-import org.sonar.server.search.SearchClient;
 
 public class ProxyClusterStatsRequestBuilder extends ClusterStatsRequestBuilder {
 
index a54edfb126ad03f273b7e8cc5ffccf2cddea8801..8c5706d78b560bc07f16f1727a426d42b1930665 100644 (file)
@@ -45,7 +45,7 @@ public class ProxySearchScrollRequestBuilder extends SearchScrollRequestBuilder
     } catch (Exception e) {
       throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
     } finally {
-        if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
+      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
         fullProfile.stop("%s", toString());
       }
     }
index 79931573e4146d967828ebe4e065d708a268b6cb..9fb60b42a2e9b9de884bf7405a5d9fb9c921a858 100644 (file)
@@ -107,7 +107,7 @@ public class ShowAction implements RequestHandler {
     for (int i = 0; i < lines.size(); i++) {
       String line = lines.get(i);
       json.beginArray();
-      json.value(i + from);
+      json.value(1L * i + from);
       json.value(line);
       json.endArray();
     }