mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 17:51:09 +07:00
PR#2100 Co-authored-by: Tagir Valeev <tagir.valeev@jetbrains.com> GitOrigin-RevId: c0b8495f26bccf51c593deb6be927eb01c37d379
13 lines
291 B
Java
13 lines
291 B
Java
// "Replace Optional presence 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);
|
|
});
|
|
}
|
|
}
|