mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
16 lines
373 B
Java
16 lines
373 B
Java
// "Assert 'container != null'" "true-preview"
|
|
import java.util.function.Supplier;
|
|
|
|
class A{
|
|
void test(){
|
|
Object container = Math.random() > 0.5 ? "" : null;
|
|
Supplier<String> r = () -> {
|
|
if (Math.random() > 0.5) {
|
|
assert container != null;
|
|
return container.toString();
|
|
} else {
|
|
return "";
|
|
}
|
|
};
|
|
}
|
|
} |