mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
new overload resolution: avoid second conflict resolution for the same conflicts, e.g. because resulted array would be available inside guard of ResolveCache (IDEA-138596)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class CommandTest {
|
||||
|
||||
public static class Command {
|
||||
public String[] getKeywords() { return new String[] {"GET", "PUT", "POST"}; }
|
||||
public String getDescription() { return "Some HTTP command"; }
|
||||
}
|
||||
|
||||
|
||||
public static void main(Stream<Command> stream) {
|
||||
stream.map(cmd -> Arrays.stream(cmd.getKeywords()).map(key -> String.format("%s -> %s", key, cmd.getDescription()))).flatMap(Function.identity());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user