| 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) { |