aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/jdisc/state/JsonUtil.java
blob: f403510df9544d0e44dd58eef6911ce72499094f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.jdisc.state;

/**
 * @author bjorncs
 */
class JsonUtil {

    private JsonUtil() {}

    static double sanitizeDouble(double value) {
        return (((Double) value).isNaN() || ((Double) value).isInfinite()) ? 0.0 : value;
    }

}