code: private static final <E extends Enum<E>> E validateProperty(Map<String, Object> map, String propName, E defaultVal, Class<E> type, ConnectorService connectorSvc) {
          String strVal = (String) map.remove(propName);
          if (strVal == null)
              return defaultVal;
  
          try {
              return E.valueOf(type, strVal);
          } catch (RuntimeException x) {
              x = connectorSvc.ignoreWarnOrFail(tc, x, x.getClass(), "UNSUPPORTED_VALUE_J2CA8011", strVal, propName, CONNECTION_MANAGER);
              if (x == null)
                  return defaultVal;
              else
                  throw x;
          }
      }
docs: Method tests whether a property's value is valid or not.<p>
  
  This method will also handle raising an exception or Tr message if the
  property is invalid.
  
  @param map map of configured properties
  @param propName the name of the property being tested
  @param defaultVal the default value
  @param type enumeration consisting of the valid values
  @param connectorSvc connector service
  @return the configured value if the value is valid, else the default value