I'm getting a compilation error on:
@Override
public Map<String, T> loadAll(Iterable<? extends String> keys) {
return Stream.of(keys)
.collect(Collectors.toMap(Function.identity(), this::load));
}
The compiler message is:
The method
collect(Collector<? super Iterable<capture#1-of ? extends String>,A,R>)
in the typeStream<Iterable<capture#1-of ? extends String>>
is not applicable for the arguments (Collector<String,capture#2-of ?,Map<Object,Reference>>
)
Any work around?