mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
22 lines
515 B
Java
22 lines
515 B
Java
import org.jetbrains.annotations.Nullable;
|
|
import java.util.function.IntSupplier;
|
|
|
|
public class LambdaAfterNullCheck {
|
|
@Nullable IntSupplier test(@Nullable String s, @Nullable String s1) {
|
|
if(s == null || s1 == null) return null;
|
|
return () -> fn(s, s1);
|
|
}
|
|
|
|
@Nullable String s;
|
|
@Nullable String s1;
|
|
|
|
@Nullable IntSupplier test2() {
|
|
if(s == null || s1 == null) return null;
|
|
return () -> fn(s, s1);
|
|
}
|
|
|
|
static int fn(String s, String s1) {
|
|
return s.hashCode()+s1.hashCode();
|
|
}
|
|
}
|