Skip to content

[Enhancement] Use ConcurrentHashMap.computeIfAbsent() replace putIfAbsent(). #1400

@zhanghailang123

Description

@zhanghailang123

Is ConcurrentHashMap.computeIfAbsent() is better than putIfAbsent() ?

In my opinion , there are several advantages

1.if key exists,it is expensive to compute value, this is the most important thing
2. computeIfAbsent() is functional interface,user it will more flexible

if we need it , please assign it to me, i will try my best

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions