mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-22 10:34:25 +07:00
12 lines
260 B
Java
12 lines
260 B
Java
// "Simplify optional chain to 'getOpt().map(...)'" "true"
|
|
import java.util.Optional;
|
|
|
|
public class Test {
|
|
public Optional<String> test() {
|
|
return getOpt().map(String::trim);
|
|
}
|
|
|
|
private Optional<String> getOpt() {
|
|
return Optional.of("foo");
|
|
}
|
|
} |