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