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

This commit is contained in:
Looly
2026-01-27 09:46:51 +08:00
parent 7014e8cbd8
commit 78ad30ef49
2 changed files with 3 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
# 🚀Changelog
-------------------------------------------------------------------------------------------------------------
# 5.8.44(2026-01-22)
# 5.8.44(2026-01-27)
### 🐣新特性
* 【core 】 `NumberUtil.parseNumber`增加支持科学计数法pr#4211@Github
* 【captcha】 `AbstractCaptcha`增加`setStroke`方法支持线条粗细issue#IDJQ15@Gitee
@@ -11,6 +11,7 @@
* 【json 】 修复`JSONUtil.wrap`忽略错误问题issue#4210@Github
* 【http 】 修复`HttpUtil.normalizeParams `在极端输入下抛 StringIndexOutOfBoundsExceptionpr#4216@Github
* 【extra 】 修复`MailAccount.setAuth`参数与field不一致问题issue#4217@Github
* 【core 】 修复`TransMap.computeIfAbsent`mappingFunction处理不一致问题issue#IDM6UR@Gitee
-------------------------------------------------------------------------------------------------------------
# 5.8.43(2026-01-04)

View File

@@ -107,7 +107,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