mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
OptionalToIfInspection: track flat map param name so it won't be used in another operation
GitOrigin-RevId: 42f90e621d37435cc122ee36c6b0a3267356c5e3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6f307e2d8c
commit
b08c47448e
+6
@@ -40,6 +40,12 @@ class Test {
|
||||
.isPresent();
|
||||
}
|
||||
|
||||
void flatMapsWithSameParamName(String param0) {
|
||||
Optional.of(param0)
|
||||
.flatMap(var0 -> Optional.of("foo").map(s -> ("foo").toLowerCase()))
|
||||
.flatMap(var0 -> Optional.of("bar")).<caret>get()
|
||||
}
|
||||
|
||||
String flatMapWithOrInside() {
|
||||
return Optional.<String>empty().flatMap(s1 -> Optional.empty().or(() -> Optional.empty())).get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user