Files
openide/java/java-tests/testData/refactoring/inlineMethod/AndChainLambda.java.after
Tagir Valeev 06d63c351a [java-refactoring] Refactor InlineMethod refactoring to use CodeBlockSurrounder
Added SurroundResult#collapse method to collapse expanded code block back.
Now, InlineMethodProcessor is simpler and preserves semantics at the call site more often.
Fixes IDEA-297364 Inline Method changes semantic for a method throwing exception

GitOrigin-RevId: 2ceb23e372e2876202dac687048ac86fb23cfc3b
2022-07-07 15:47:34 +00:00

13 lines
247 B
Plaintext

import java.util.function.Predicate;
class X {
Predicate<String> predicate() {
return s -> {
if (s.isEmpty()) return false;
int length = s.length();
int ch = s.charAt(0);
return length + ch > 0;
};
}
}