Files
openide/java/java-tests/testData/inspection/dataFlow/fixture/LambdaAfterNullCheck.java
Tagir Valeev 107adb48ab LiveVariablesAnalyzer: flush on &&/|| chains + minor bug fixes
Fixes IDEA-204984 Inspect Code hangs for single java file
2019-01-10 12:24:20 +07:00

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();
}
}