code: public static Integer getPropertyAsInteger(String name, Integer def) {
          String value = getProperty(name);
          if (value != null) {
              try {
                  return Integer.parseInt(value);
              } catch (NumberFormatException e) {
                  LOG.log(Level.WARNING, "Failed to convert property value '" + value + "' to integer", e);
              }
          }
          return def;
      }
docs: This method returns the property as an integer value.
  
  @param name The property name
  @param def The optional default value
  @return The property as an integer, or null if not found