mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-15 11:58:18 +07:00
Merge branch 'master' into vplyashkun/inplace_rename_lags
GitOrigin-RevId: aaecc2a32e4e42de827efb45b8df733874a722e4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8198db1ca9
commit
61a3e18b78
+14
@@ -0,0 +1,14 @@
|
||||
// "Replace Optional.isPresent() condition with functional style expression" "false"
|
||||
import java.util.Optional;
|
||||
|
||||
class Test {
|
||||
Object get() {
|
||||
Optional<String> obj = Stream.of("one", "two").filter(s -> Math.sqrt(s.length()) > 100).findFirst();
|
||||
if (obj.<caret>isPresent()) {
|
||||
return obj.get();
|
||||
} else {
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user