public Double getValidDouble()

in src/main/java/org/apache/sling/xss/impl/XSSAPIImpl.java [138:150]


    public Double getValidDouble(String source, double defaultValue) {
        if (source != null && source.length() > 0) {
            try {
                return validator.getValidDouble("XSS", source, 0d, Double.MAX_VALUE, false);
            } catch (Exception e) {
                LOGGER.warn("Unable to get a valid double from the input.", e);
                LOGGER.debug("Double input: {}", source);
            }
        }

        // fall through to default if empty, null, or validation failure
        return defaultValue;
    }