Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/other/afterMapToArray.java
T
Tagir Valeev 3210510c96 CollectionUtils#isCollectionOrMapSize
Used in ToArrayCallWithZeroLengthArrayArgumentInspection and StreamApiMigrationInspection
2018-01-30 11:01:38 +07:00

10 lines
288 B
Java

// "Replace with toArray" "true"
import java.util.*;
import java.util.stream.IntStream;
public class Main {
public String[] test(Map<String, String> map) {
String[] array = IntStream.range(0, map.size()).mapToObj(String::valueOf).toArray(String[]::new);
return array;
}
}