mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-06 01:06:54 +07:00
15 lines
370 B
Java
15 lines
370 B
Java
// "Replace with 'Set.of()' call" "false"
|
|
import java.util.Collections;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
public class Test {
|
|
static Set<String> WRONG_SET = new HashSet<>();
|
|
|
|
public static final Set<String> MY_SET = Collections.unmod<caret>ifiableSet(new HashSet<String>() {{
|
|
add("a");
|
|
add("b");
|
|
WRONG_SET.add("c".toUpperCase());
|
|
}});
|
|
}
|