private static int getPropertyInt(String[] propertyNames, int defaultValue) {
    String strValue;
    for (String propertyName : propertyNames) {
      strValue = System.getProperty(propertyName);
      if (strValue != null) {
        try {
          return Integer.parseInt(strValue);
        }
        catch (NumberFormatException e) {
          logger.warn("NumberFormatException: can't parse to int [propertyName="
                      + propertyName + " stringValue=" + strValue + " defaultValue=" + defaultValue + ")");
          return defaultValue;
        }
      }
    }
    return defaultValue;
  }
private static int getPropertyInt(String[] propertyNames, int defaultValue)