mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
11 lines
314 B
Java
11 lines
314 B
Java
// "Replace Optional.isPresent() condition with functional style expression" "GENERIC_ERROR_OR_WARNING"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.Optional;
|
|
|
|
public class Main {
|
|
void test(Optional<String> foo) {
|
|
double bar = foo.isPresent<caret>() ? foo.get().length() * 1.2 : 0;
|
|
}
|
|
} |