Skip to content

Commit

Permalink
Remove stale comments about @NonNull annotations in the JDK.
Browse files Browse the repository at this point in the history
Our nullness checking has seen `@NonNull` annotations in the JDK since cl/648064454.

RELNOTES=n/a
PiperOrigin-RevId: 672970833
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Sep 10, 2024
1 parent 930cc58 commit 7bc08c1
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions guava/src/com/google/common/collect/Maps.java
Original file line number Diff line number Diff line change
Expand Up @@ -1770,11 +1770,6 @@ public V computeIfAbsent(

@Override
@CheckForNull
/*
* Our checker arguably should produce a nullness error here until we see @NonNull in JDK APIs.
* But it doesn't, which may be a sign that we still permit parameter contravariance in some
* cases?
*/
public V computeIfPresent(
K key, BiFunction<? super K, ? super @NonNull V, ? extends @Nullable V> remappingFunction) {
throw new UnsupportedOperationException();
Expand Down Expand Up @@ -3686,17 +3681,8 @@ public V computeIfAbsent(
throw new UnsupportedOperationException();
}

/*
* TODO(cpovirk): Uncomment the @NonNull annotations below once our JDK stubs and J2KT
* emulations include them.
*/
@Override
@CheckForNull
/*
* Our checker arguably should produce a nullness error here until we see @NonNull in JDK APIs.
* But it doesn't, which may be a sign that we still permit parameter contravariance in some
* cases?
*/
public V computeIfPresent(
K key, BiFunction<? super K, ? super @NonNull V, ? extends @Nullable V> remappingFunction) {
throw new UnsupportedOperationException();
Expand Down

0 comments on commit 7bc08c1

Please sign in to comment.