aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-17 17:09:46 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-17 17:09:46 +0200
commitd729f8a4210f367385bce3784bcf12bd7602e1d1 (patch)
treef7ae0da926c80e2a4c9f1c13a28a340bab4d85fd /server
parente5fbacf7b03340882e7069e23c11f6aeb0748976 (diff)
downloadsonarqube-d729f8a4210f367385bce3784bcf12bd7602e1d1.tar.gz
sonarqube-d729f8a4210f367385bce3784bcf12bd7602e1d1.zip
Fix quality flaw
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java b/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java
index f7f924bcd73..6640389d547 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java
@@ -186,7 +186,7 @@ public class NodeHealth {
.setWarnThreshold(10)
.setErrorThreshold(50)
.setMessage("Too complex documents or low IO/CPU")
- .setValue(indexTotalTime / indexCount));
+ .setValue(indexCount > 0L ? indexTotalTime / indexCount : 0.0));
// Query stats
long queryCount = nodesStats.getIndices().getSearch().getTotal().getQueryCount();