Sign in
◑
Theme
android
/
platform
/
tools
/
idea
/
studio-master-dev
/
.
/
java
/
java-tests
/
testData
/
inspection
/
java8MapApi
/
afterIfCompute.java
blob: 377b745e696504830ec4d91faa3d01a4ab5c95f4 [
file
]
// "Replace with 'computeIfAbsent' method call" "true"
import
java
.
util
.*;
class
Test
{
int
k
;
void
ensureExists
(
Map
<
String
,
List
<
String
>>
map
,
String
key
)
{
map
.
computeIfAbsent
(
key
,
k1
->
new
ArrayList
<>());
}
}