private static int parseInt(String s) {
        try {
            return Integer.parseInt(s);
        } catch (NumberFormatException nfe) {
            log.error("Unable to parse integer value '" + s + "'", nfe);
        }

        return -1;
    }
private static int parseInt ( String s ) { try { return Integer . parseInt ( s ) ; } catch ( NumberFormatException nfe ) { log . error ( "Unable to parse integer value '" + s + "'" , nfe ) ; } return - 1 ; }
Safely parses the specified string as an integer and returns the value.
If a NumberFormatException occurs while parsing the integer, an error is
logged and -1 is returned.

@param s
The string to parse and return as an integer.

@return The integer value of the specified string, otherwise -1 if there
were any problems parsing the string as an integer.