mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-18 12:03:50 +07:00
21564bba7b
IDEA-163462 Simplify Optional.isPresent() ? Optional.get() : ...
12 lines
259 B
Java
12 lines
259 B
Java
// "Replace Optional.isPresent() condition with functional style expression" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
String val;
|
|
|
|
public void testOptional(Optional<String> str) {
|
|
this.val = str.orElse("");
|
|
System.out.println(val);
|
|
}
|
|
} |