mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix bug
This commit is contained in:
parent
ed44167d5c
commit
92807dc7a7
@ -1267,10 +1267,13 @@ public class MapUtil extends MapGetUtil {
|
||||
|
||||
/**
|
||||
* 如果 key 对应的 value 不存在,则使用获取 mappingFunction 重新计算后的值,并保存为该 key 的 value,否则返回 value。<br>
|
||||
* 方法来自Dubbo,解决使用ConcurrentHashMap.computeIfAbsent导致的死循环问题。(issues#2349)<br>
|
||||
* 解决使用ConcurrentHashMap.computeIfAbsent导致的死循环问题。(issues#2349)<br>
|
||||
* A temporary workaround for Java 8 specific performance issue JDK-8161372 .<br>
|
||||
* This class should be removed once we drop Java 8 support.
|
||||
* 参考:https://github.com/apache/dubbo/blob/3.2/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConcurrentHashMapUtils.java
|
||||
*
|
||||
* <p>
|
||||
* 注意此方法只能用于JDK8
|
||||
* </p>
|
||||
*
|
||||
* @param <K> 键类型
|
||||
* @param <V> 值类型
|
||||
|
@ -21,7 +21,7 @@ import java.util.function.Function;
|
||||
/**
|
||||
* 安全的ConcurrentHashMap实现<br>
|
||||
* 此类用于解决在JDK8中调用{@link ConcurrentHashMap#computeIfAbsent(Object, Function)}可能造成的死循环问题。<br>
|
||||
* 方法来自Dubbo,见:issues#2349<br>
|
||||
* 见:issues#2349<br>
|
||||
* <p>
|
||||
* 相关bug见:@see <a href="https://bugs.openjdk.java.net/browse/JDK-8161372">https://bugs.openjdk.java.net/browse/JDK-8161372</a>
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user