public Integer getValidInteger()

in src/main/java/org/apache/sling/xss/impl/XSSAPIImpl.java [99:111]


    public Integer getValidInteger(String integer, int defaultValue) {
        if (integer != null && integer.length() > 0) {
            try {
                return validator.getValidInteger("XSS", integer, -2000000000, 2000000000, false);
            } catch (Exception e) {
                LOGGER.warn("Unable to get a valid integer from the input.", e);
                LOGGER.debug("Integer input: {}", integer);
            }
        }

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