From b391629de100c4ba09d313c679cb9280a4a2a7a1 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 28 Nov 2011 20:48:02 +0000 Subject: [PATCH] LinkedCaseInsensitiveMap overrides putAll method as well (for IBM JDK 1.6 compatibility; SPR-7969) --- .../util/LinkedCaseInsensitiveMap.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/org.springframework.core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java b/org.springframework.core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java index 8ab19d4238..e5df7256ec 100644 --- a/org.springframework.core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java +++ b/org.springframework.core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -92,6 +92,16 @@ public class LinkedCaseInsensitiveMap extends LinkedHashMap { return super.put(key, value); } + @Override + public void putAll(Map map) { + if (map.isEmpty()) { + return; + } + for (Map.Entry entry : map.entrySet()) { + put(entry.getKey(), entry.getValue()); + } + } + @Override public boolean containsKey(Object key) { return (key instanceof String && this.caseInsensitiveKeys.containsKey(convertKey((String) key)));