mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
19 lines
412 B
Java
19 lines
412 B
Java
// "Replace method call on lambda with lambda body" "true-preview"
|
|
|
|
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();
|
|
}
|
|
}
|