mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
12 lines
342 B
Java
12 lines
342 B
Java
// "Replace Optional.isPresent() 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;
|
|
}
|
|
} |