mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 03:51:12 +07:00
It's unnecessary and otherwise try-block is automatically unwrapped (see com.intellij.psi.impl.source.tree.java.PsiTryStatementImpl.deleteChildInternal) causing EA-235365 - PIEAE: LazyParseablePsiElement.getContainingFile GitOrigin-RevId: 4ea3e54f8ea27854e23537a8de22f2923feaf842
15 lines
398 B
Java
15 lines
398 B
Java
// "Fix all 'Stream API call chain can be replaced with loop' problems in file" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
interface MyAutoCloseable {
|
|
void close();
|
|
}
|
|
|
|
void test(List<MyAutoCloseable> list) {
|
|
try(MyAutoCloseable ac = list<caret>.stream().filter(Objects::nonNull).findFirst().orElse(null)) {
|
|
System.out.println(ac);
|
|
}
|
|
}
|
|
} |