Open migrator opened 10 years ago
Maps.unmodifiableNavigableMap is declared as follows:
<K, V> NavigableMap<K, V> unmodifiableNavigableMap(NavigableMap<K, V> map);
this could be changed to
<K, V> NavigableMap<K, V> unmodifiableNavigableMap(NavigableMap<K, ? extends V> map);
as there are no methods in NavigableMap that take a V as a method parameter. This would also be consistent with the declarations of Collections.unmodifiableSortedMap and ImmutableSortedMap.copyOfSorted.
relevance: 2
summary: Not Defined
I believe you are correct. And this will probably be sufficiently safe to change. Thanks!
status Not Defined creator: kevinb@google.com created at: Oct 23 (5 days ago)
Maps.unmodifiableNavigableMap is declared as follows:
<K, V> NavigableMap<K, V> unmodifiableNavigableMap(NavigableMap<K, V> map);
this could be changed to
<K, V> NavigableMap<K, V> unmodifiableNavigableMap(NavigableMap<K, ? extends V> map);
as there are no methods in NavigableMap that take a V as a method parameter. This would also be consistent with the declarations of Collections.unmodifiableSortedMap and ImmutableSortedMap.copyOfSorted.
relevance: 2