Browse Source

修改了CaseInsensitiveMap的remove等方法并没有忽略大小写的问题

xjm 5 years ago
parent
commit
5478b1d67b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      hutool-core/src/main/java/cn/hutool/core/map/CustomKeyMap.java

+ 12 - 0
hutool-core/src/main/java/cn/hutool/core/map/CustomKeyMap.java

@@ -46,6 +46,18 @@ public abstract class CustomKeyMap<K, V> extends MapWrapper<K, V> {
 		return super.containsKey(customKey(key));
 	}
 
+	@Override
+	public V remove(Object key) { return super.remove(customKey(key)); }
+
+	@Override
+	public boolean remove(Object key, Object value) { return super.remove(customKey(key), value); }
+
+	@Override
+	public boolean replace(K key, V oldValue, V newValue) { return super.replace((K) customKey(key), oldValue, newValue); }
+
+	@Override
+	public V replace(K key, V value) { return super.replace((K) customKey(key), value); }
+
 	/**
 	 * 自定义键
 	 *