mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 16:19:58 +07:00
trivial functional: fix dangling return (IDEA-229670)
GitOrigin-RevId: f69be223e2d79dae71ce7fb82aeb0f82eb5e5cb6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dd5ed9a83e
commit
1601753a54
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace method call on lambda with lambda body" "true"
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
abstract class TrivialUsageInline {
|
||||
|
||||
public <T> T evaluateUnderLock(Supplier<T> supplier) {
|
||||
if (true) {
|
||||
return supplier.get();
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// "Replace method call on lambda with lambda body" "true"
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
abstract class TrivialUsageInline {
|
||||
|
||||
public <T> T evaluateUnderLock(Supplier<T> supplier) {
|
||||
return ((Supplier<T>) () -> {
|
||||
if (true) {
|
||||
return supplier.get();
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}).g<caret>et();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user