修复TransMap.computeIfAbsentmappingFunction处理不一致问题(issue#IDM6UR@Gitee)

This commit is contained in:
Looly
2026-01-27 09:47:00 +08:00
parent 1c910965d2
commit 5af9d67e50

View File

@@ -125,7 +125,7 @@ public abstract class TransMap<K, V> extends MapWrapper<K, V> {
@Override
public V computeIfAbsent(final K key, final Function<? super K, ? extends V> mappingFunction) {
return super.computeIfAbsent(customKey(key), mappingFunction);
return super.computeIfAbsent(customKey(key), k -> customValue(mappingFunction.apply(customKey(k))));
}
//---------------------------------------------------------------------------- Override default methods end