Skip to content

Commit

Permalink
Changing Void to be annotated with @nullable and updating any other n…
Browse files Browse the repository at this point in the history
…eeded types this should be a no-op for everything but J2KT.

This change will prevent J2KT from erroneously null!!.  This is valid because Void is always Nullable in Java (or the code can not execute).

RELNOTES=n/a
PiperOrigin-RevId: 714075337
  • Loading branch information
jparachoniak authored and Google Java Core Libraries committed Jan 10, 2025
1 parent aeb9099 commit 77cf121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/guava/src/com/google/common/base/Suppliers.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static class NonSerializableMemoizingSupplier<T extends @Nullable Object> implem
private final Object lock = new Object();

@SuppressWarnings("UnnecessaryLambda") // Must be a fixed singleton object
private static final Supplier<Void> SUCCESSFULLY_COMPUTED =
private static final Supplier<@Nullable Void> SUCCESSFULLY_COMPUTED =
() -> {
throw new IllegalStateException(); // Should never get called.
};
Expand Down
2 changes: 1 addition & 1 deletion guava/src/com/google/common/base/Suppliers.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static class NonSerializableMemoizingSupplier<T extends @Nullable Object> implem
private final Object lock = new Object();

@SuppressWarnings("UnnecessaryLambda") // Must be a fixed singleton object
private static final Supplier<Void> SUCCESSFULLY_COMPUTED =
private static final Supplier<@Nullable Void> SUCCESSFULLY_COMPUTED =
() -> {
throw new IllegalStateException(); // Should never get called.
};
Expand Down

0 comments on commit 77cf121

Please sign in to comment.