private Integer parseIntegerFromParam(final String value, final int defaultValue) {
        try {
            return Integer.valueOf(value);
        } catch (NumberFormatException | NullPointerException e) {
            return defaultValue;
        }
    }
private Integer parseIntegerFromParam ( final String value , final int defaultValue ) { try { return Integer . valueOf ( value ) ; } catch ( NumberFormatException | NullPointerException e ) { return defaultValue ; } }
Parses a parameter to an Integer, defaulting to 0 upon any errors encountered.
@param value the value to parse
@param defaultValue the default value to use
@return an Integer