aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-webapi/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-webserver-webapi/src')
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/measure/custom/ws/CustomMeasureJsonWriter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/measure/custom/ws/CustomMeasureJsonWriter.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/measure/custom/ws/CustomMeasureJsonWriter.java
index 7f3635d4b45..dc71e211e5f 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/measure/custom/ws/CustomMeasureJsonWriter.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/measure/custom/ws/CustomMeasureJsonWriter.java
@@ -88,7 +88,7 @@ public class CustomMeasureJsonWriter {
switch (metricType) {
case BOOL:
- return doubleValue == 1.0d ? "true" : "false";
+ return Double.compare(doubleValue, 1.0D) == 0 ? "true" : "false";
case INT:
case MILLISEC:
return String.valueOf((int) doubleValue);