Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/composeFunctionChain/afterStaticCall.java

12 lines
332 B
Java

// "Replace nested function call with andThen call" "true"
import java.util.function.UnaryOperator;
public class Main {
private void testFn(boolean b) {
String foo = "xyz";
Integer f = (b ? (UnaryOperator<String>) String::trim : (UnaryOperator<String>) s -> s.substring(1)).andThen(Integer::parseInt).apply(foo);
}
}