mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
15 lines
345 B
Java
15 lines
345 B
Java
// "Fix all ''Optional' can be replaced with sequence of 'if' statements' problems in file" "true"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
|
|
String returnOfOrElseValue(String in) {
|
|
return Optional.ofNullable<caret>(in).orElse("foo");
|
|
}
|
|
|
|
void assignmentOfOrElseValue(String in) {
|
|
String out = Optional.ofNullable(in).orElse("foo");
|
|
}
|
|
|
|
} |