mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
12 lines
236 B
Java
12 lines
236 B
Java
// "Replace loop with 'Arrays.setAll()' method call" "true"
|
|
|
|
import java.util.Arrays;
|
|
|
|
class Test {
|
|
|
|
void test(boolean choice) {
|
|
Object[] arr = new Object[10];
|
|
Arrays.setAll(arr, i -> (choice ? "foo" : new Object()));
|
|
}
|
|
|
|
} |