Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapWithMutable/afterMap.java
Tagir Valeev 49f4397ba0 [java-intentions] More preview tests
GitOrigin-RevId: 4d6a5487576dbbc4aca9c89b067eec8218aff686
2022-07-29 17:55:15 +00:00

9 lines
263 B
Java

// "Wrap 'map' with 'HashMap'" "true-preview"
import java.util.*;
class Test {
void testComparator() {
Map<String, Integer> map = new HashMap<>(Math.random() > 0.5 ? Collections.emptyMap() : Collections.singletonMap("foo", 1));
map.put(123, 456);
}
}