aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();