private void checkLimits()

in wilma-application/modules/wilma-property-validation/src/main/java/com/epam/wilma/properties/validation/SafeguardLimitValidator.java [58:76]


    private void checkLimits(final SafeguardLimits limits) {
        if (limits.hasNullField()) {
            throw new InvalidPropertyException("Safeguard limit can't be null!");
        } else if (limits.getFiOnLimit() > limits.getFiOffLimit()) {
            throw new InvalidPropertyException("Safeguard fastinfoset decompression off limit must be greater than fastinfoset on limit!");
        } else if (limits.getFiOnLimit() > limits.getMwOnLimit()) {
            throw new InvalidPropertyException("Safeguard fastinfoset decompression on limit must be less than message writing on limit!");
        } else if (limits.getFiOffLimit() > limits.getMwOffLimit()) {
            throw new InvalidPropertyException("Safeguard fastinfoset decompression off limit must be less than message writing off limit!");
        } else if (limits.getMwOnLimit() > limits.getMwOffLimit()) {
            throw new InvalidPropertyException("Safeguard message writing on limit must be less than message writing off limit!");
        } else if (limits.getJmxPort() != null) {
            try {
                Integer.parseInt(limits.getJmxPort());
            } catch (NumberFormatException e) {
                throw new InvalidPropertyException("Specified JMX port is unusable!");
            }
        }
    }