mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
13 lines
301 B
Java
13 lines
301 B
Java
// "Replace Optional.isPresent() condition with functional style expression" "INFORMATION"
|
|
|
|
import java.util.Optional;
|
|
|
|
public class Main {
|
|
public void test(Optional<String> opt) {
|
|
if(opt.isPres<caret>ent()) {
|
|
if(opt.get().equals("abc"))
|
|
System.out.println(opt.get());
|
|
}
|
|
}
|
|
}
|