code: public static boolean getBooleanValue(Object newValue, boolean defaultValue) {
          if (newValue != null) {
              if (newValue instanceof String) {
                  return Boolean.parseBoolean((String) newValue);
              } else if (newValue instanceof Boolean)
                  return (Boolean) newValue;
          }
  
          return defaultValue;
      }
docs: Read boolean value from properties: begin by preserving the old value. If
  the property is found, and the new value is an boolean, the new value
  will be returned.
  
  @param newValue
  New parameter value to parse/evaluate
  @param defaultValue
  Starting/Previous value
  @return defaultValue if the newValue is null or is was badly
  formatted, or the converted new value