blob: 4a2428cb9f6e1983626606d1e760e655d2d77039 [file]
// "Unwrap" "false"
import java.util.*;
public class Tests {
void test(List<String> list) {
// Will be reported as "Excessive lambda usage", changing to orElse which will trigger rewrapping inspection
// no need to do this in single step
Optional<String> opt = Optional.ofNullable(list.stream().filter(Objects::nonNull).findFirst().<caret>orElseGet(() -> null));
}
}