mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 09:39:37 +07:00
13 lines
317 B
Java
13 lines
317 B
Java
// "Replace Optional.isPresent() condition with functional style expression" "INFORMATION"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void testOptional(Optional<String> str) {
|
|
str.ifPresent(s -> {
|
|
System.out.println(s);
|
|
// once again!
|
|
System.out.println(s);
|
|
});
|
|
}
|
|
} |