mirror of
https://gitee.com/dromara/hutool.git
synced 2026-02-09 09:16:26 +08:00
修复TransMap.computeIfAbsentmappingFunction处理不一致问题(issue#IDM6UR@Gitee)
This commit is contained in:
@@ -87,17 +87,17 @@ public abstract class TransMap<K, V> extends MapWrapper<K, V> {
|
||||
|
||||
@Override
|
||||
public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
||||
return super.computeIfPresent(customKey(key), (k, v) -> remappingFunction.apply(customKey(k), customValue(v)));
|
||||
return super.computeIfPresent(customKey(key), (k, v) -> remappingFunction.apply(k, customValue(v)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
||||
return super.compute(customKey(key), (k, v) -> remappingFunction.apply(customKey(k), customValue(v)));
|
||||
return super.compute(customKey(key), (k, v) -> remappingFunction.apply(k, customValue(v)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
|
||||
return super.merge(customKey(key), customValue(value), (v1, v2) -> remappingFunction.apply(customValue(v1), customValue(v2)));
|
||||
return super.merge(customKey(key), customValue(value), remappingFunction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user