code: private <E extends Enum<E>> E remove(String name, E defaultValue, Class<E> type) throws Exception {
          E value = null;
  
          for (int diff; value == null && entry != null && (diff = entry.getKey().compareTo(name)) <= 0; entry = entries.pollFirstEntry()) {
              if (diff == 0) // matched
                  try {
                      value = (E) E.valueOf(type, (String) entry.getValue());
                  } catch (Exception x) {
                      x = connectorSvc.ignoreWarnOrFail(null, x, x.getClass(), "UNSUPPORTED_VALUE_J2CA8011", entry.getValue(), name, jndiName == null ? id : jndiName);
                      if (x != null)
                          throw x;
                  }
              else {
                  // TODO: when we have a stricter variant of onError, apply it to unrecognized attributes
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(this, tc, "unrecognized attribute: " + entry.getKey());
                  //SQLException ex = AdapterUtil.ignoreWarnOrFail(tc, null, SQLException.class, "PROP_NOT_FOUND", jndiName == null ? id : jndiName, entry.getKey());
                  //if (ex != null)
                  //    throw ex;
              }
          }
  
          return value == null ? defaultValue : value;
      }
docs: Remove properties up to and including the specified property. Return the property if found.
  
  @param name name of the property.
  @param defaultValue default value to use if not found.
  @param type the enumeration class.
  @return value of the property if found. Otherwise the default value.
  @throws Exception if an error occurs.