mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
13 lines
294 B
Java
13 lines
294 B
Java
// "Replace Optional.isPresent() condition with functional style expression" "INFORMATION"
|
|
|
|
import java.util.Optional;
|
|
|
|
public class Main {
|
|
public void test(Optional<String> opt) {
|
|
opt.ifPresent(s -> {
|
|
if (s.equals("abc"))
|
|
System.out.println(s);
|
|
});
|
|
}
|
|
}
|