MCPcopy Create free account
hub / github.com/apache/tomcat / mergeMap

Method mergeMap

java/org/apache/tomcat/util/descriptor/web/WebXml.java:2490–2509  ·  view source on GitHub ↗
(Map<String,T> fragmentMap, Map<String,T> mainMap, Map<String,T> tempMap,
            WebXml fragment, String mapName)

Source from the content-addressed store, hash-verified

2488 }
2489
2490 private <T> boolean mergeMap(Map<String,T> fragmentMap, Map<String,T> mainMap, Map<String,T> tempMap,
2491 WebXml fragment, String mapName) {
2492 for (Entry<String,T> entry : fragmentMap.entrySet()) {
2493 final String key = entry.getKey();
2494 if (!mainMap.containsKey(key)) {
2495 // Not defined in main web.xml
2496 T value = entry.getValue();
2497 if (tempMap.containsKey(key)) {
2498 if (value != null && !value.equals(tempMap.get(key))) {
2499 log.error(sm.getString("webXml.mergeConflictString", mapName, key, fragment.getName(),
2500 fragment.getURL()));
2501 return false;
2502 }
2503 } else {
2504 tempMap.put(key, value);
2505 }
2506 }
2507 }
2508 return true;
2509 }
2510
2511 private static boolean mergeFilter(FilterDef src, FilterDef dest, boolean failOnConflict) {
2512 if (dest.getAsyncSupported() == null) {

Callers 1

mergeMethod · 0.95

Calls 11

getValueMethod · 0.65
equalsMethod · 0.65
getMethod · 0.65
errorMethod · 0.65
getStringMethod · 0.65
getNameMethod · 0.65
getURLMethod · 0.65
putMethod · 0.65
entrySetMethod · 0.45
getKeyMethod · 0.45
containsKeyMethod · 0.45

Tested by

no test coverage detected