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