Files
openide/java/java-tests/testData/inspection/java8MapApi/beforeComputeNotSiblingStatements.java
2026-01-16 13:57:13 +00:00

10 lines
253 B
Java

// "Replace with 'compute()' call" "false"
import java.util.Map;
public class Main {
public void testCompute(Map<String, Integer> map, String key) {
Integer value = map.get(key);
%
map.pu<caret>t(key, value == null ? 0 : value + 1);
}
}