docs: protected <T> T mergeXMLValue(T oldValue,
                                    T newValue,
                                    String elementName,
                                    String key,
                                    Map<T, String> valueNames) throws InjectionConfigurationException {
          if (newValue == null) {
              return oldValue;
          }
  
          if (oldValue != null && !newValue.equals(oldValue)) {
              Object oldValueName = valueNames == null ? oldValue : valueNames.get(oldValue);
              Object newValueName = valueNames == null ? newValue : valueNames.get(newValue);
              mergeError(oldValueName, newValueName, true, elementName, false, key);
              return oldValue;
          }
  
          return newValue;
      }