Closed
Description
How does one satisfy NullAway here:
public interface RedisCache {
...
@Nullable
<T> Map<String, T> hgetall(CachedKey key);
...
}
...
public class Example {
private final Function<RedisCache.CachedKey, Map<String, String>> retrieveFn;
...
public Example() {
retrieveFn = redisCache::hgetall; // <<<<<<<<<<<<
}
Example.java error: [NullAway] referenced method returns @Nullable, but functional interface method java.util.function.Function.apply(T) returns @NonNull
retrieveFn = redisCache::hgetall;
^
Metadata
Metadata
Assignees
Labels
No labels