mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 04:07:30 +07:00
GitOrigin-RevId: 538bc7c7d357505d2e48bdd59c06bc0a707e07ec
10 lines
282 B
Java
10 lines
282 B
Java
// "Remove redundant Optional chain" "true"
|
|
import java.util.Optional;
|
|
|
|
class Test {
|
|
void execute(String s) {
|
|
System.out.println(Optional./*1*/<caret>ofNullable(/*2*/someFunc(/*3*/)/*4*/).orElse(/*5*/null)/*6*/);
|
|
}
|
|
|
|
String someFunc() {throw new IllegalStateException();}
|
|
} |