mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 06:20:54 +07:00
13 lines
354 B
Java
13 lines
354 B
Java
// "Extract Set from comparison chain" "true-preview"
|
|
import java.util.*;
|
|
|
|
public class Test {
|
|
private static final Set<String> S = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("foo", "bar", "baz", "quz")));
|
|
|
|
void testOr(String s) {
|
|
if(Objects.equals(s, null) || S.contains(s)) {
|
|
System.out.println("foobarbaz");
|
|
}
|
|
}
|
|
}
|