mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-28 06:51:01 +07:00
PR#2100 Co-authored-by: Tagir Valeev <tagir.valeev@jetbrains.com> GitOrigin-RevId: c0b8495f26bccf51c593deb6be927eb01c37d379
12 lines
339 B
Java
12 lines
339 B
Java
// "Replace Optional presence condition with functional style expression" "true-preview"
|
|
|
|
import java.util.Optional;
|
|
|
|
public class Main {
|
|
public Optional<String> get() {
|
|
Optional<String> port = Optional.ofNullable(System.getProperty("abc");
|
|
Optional<String> result;
|
|
result = port.map(String::trim);
|
|
return result;
|
|
}
|
|
} |