protected int generateInteger(String value,String parameterName) throws BadApiRequestException {
  try {
    return value == null ? 0 : Integer.parseInt(value);
  }
 catch (  NumberFormatException nfe) {
    LOG.debug(INTEGER_INVALID.logFormat(value,parameterName),nfe);
    throw new BadApiRequestException(INTEGER_INVALID.logFormat(value,parameterName),nfe);
  }
}

protected int generateInteger ( String value , String parameterName ) throws BadApiRequestException { try { return value == null ? 0 : Integer . parseInt ( value ) ; } catch ( NumberFormatException nfe ) { LOG . debug ( INTEGER_INVALID . logFormat ( value , parameterName ) , nfe ) ; throw new BadApiRequestException ( INTEGER_INVALID . logFormat ( value , parameterName ) , nfe ) ; } }
parses the requested input string by converting it to an integer , while treating null as zero .
