aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-12-08 17:38:24 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-12-08 17:38:24 +0100
commit02ae6ed098db3b4b97cebcf02e727596a467bed4 (patch)
treec680fe0a6dd321f9d836179bef0f820598fef7d8 /server
parentd8b2419ba390e7602cf33718e9ef1c5b07c81cb5 (diff)
downloadsonarqube-02ae6ed098db3b4b97cebcf02e727596a467bed4.tar.gz
sonarqube-02ae6ed098db3b4b97cebcf02e727596a467bed4.zip
Fix quality flaws
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/search/request/ProxyClusterStatsRequestBuilder.java1
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/search/request/ProxySearchScrollRequestBuilder.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/source/ws/ShowAction.java2
3 files changed, 2 insertions, 3 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxyClusterStatsRequestBuilder.java b/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxyClusterStatsRequestBuilder.java
index cba4108d9f0..3a2ba514026 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxyClusterStatsRequestBuilder.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxyClusterStatsRequestBuilder.java
@@ -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 {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxySearchScrollRequestBuilder.java b/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxySearchScrollRequestBuilder.java
index a54edfb126a..8c5706d78b5 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxySearchScrollRequestBuilder.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/search/request/ProxySearchScrollRequestBuilder.java
@@ -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());
}
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/source/ws/ShowAction.java b/server/sonar-server/src/main/java/org/sonar/server/source/ws/ShowAction.java
index 79931573e41..9fb60b42a2e 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/source/ws/ShowAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/source/ws/ShowAction.java
@@ -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();
}