Upgrading from 0.12.1 to 0.12.2 and I am confused by these new warnings.
> Task :caffeine:compileJava
/Users/ben/projects/caffeine/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java:3180: warning: [NullAway] Cannot pass parameter of type Function<@org.jspecify.annotations.Nullable V, @org.jspecify.annotations.Nullable V>, as formal parameter has type Function<V, V>, which has mismatched type parameter nullability
.map(node -> nodeToCacheEntry(node, transformer))
^
(see http://t.uber.com/nullaway )
Did you mean '@SuppressWarnings("NullAway") <T> T snapshot(Iterable<Node<K, V>> iterable, Function<@Nullable V, @Nullable V> transformer,'?
/Users/ben/projects/caffeine/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java:4014: warning: [NullAway] Cannot pass parameter of type Function<@org.jspecify.annotations.Nullable V, @org.jspecify.annotations.Nullable V>, as formal parameter has type Function<V, V>, which has mismatched type parameter nullability
return (node == null) ? null : cache.nodeToCacheEntry(node, transformer);
^
(see http://t.uber.com/nullaway )
Did you mean '@SuppressWarnings("NullAway") @Override public @Nullable CacheEntry<K, V> getEntryIfPresentQuietly(K key) {'?
The snapshot method and nodeToCacheEntry method both use the same types for the transformer parameter.
<T> T snapshot(Iterable<Node<K, V>> iterable, Function<@Nullable V, @Nullable V> transformer,
Function<Stream<CacheEntry<K, V>>, T> mappingFunction)
@Nullable CacheEntry<K, V> nodeToCacheEntry(
Node<K, V> node, Function<@Nullable V, @Nullable V> transformer)
The other warning is similar. It appears to be a regression.
Note that you might have to use --rerun, --rerun-tasks or --no-build-cache to force recompilations.
Upgrading from
0.12.1to0.12.2and I am confused by these new warnings.The
snapshotmethod andnodeToCacheEntrymethod both use the same types for thetransformerparameter.The other warning is similar. It appears to be a regression.
Note that you might have to use
--rerun,--rerun-tasksor--no-build-cacheto force recompilations.