private static int parseInt(String value, int defaultValue) {

		if (value == null) {

			return defaultValue;

		}

		try {
			return Integer.parseInt(value);
		} catch (Throwable ignore) {}

		return defaultValue;
	}
private static int parseInt ( String value , int defaultValue ) { if ( value == null ) { return defaultValue ; } try { return Integer . parseInt ( value ) ; } catch ( Throwable ignore ) { } return defaultValue ; }
Tries to parse the given String to an int value, returning
defaultValue on error.

@param value the source String to parse
@param defaultValue the default value that will be returned when parsing fails
@return the parsed value or the given default value when parsing fails