private void failIfParametersAreNotInTheirValidValueRanges()

in src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java [511:528]


    private void failIfParametersAreNotInTheirValidValueRanges() throws MojoFailureException {
        if (compress != null && (compress < 0 || compress > 2)) {
            String message = "The given compress parameters " + compress + " is not in the valid value range from 0..2";
            getLog().error(message);
            throw new MojoFailureException(message);
        }

        if (endian != null && (!"big".equals(endian) && !"little".equals(endian))) {
            String message = "The given endian parameter " + endian
                    + " does not contain one of the following values: 'little' or 'big'.";
            getLog().error(message);
            throw new MojoFailureException(message);
        }

        if (addOptions != null && !addOptions.isEmpty()) {
            requireJdk14();
        }
    }