Skip to content

Commit

Permalink
Allow null values in SimpleValue set and equals methods
Browse files Browse the repository at this point in the history
  • Loading branch information
xzel23 committed Oct 4, 2023
1 parent e351a8d commit 533022f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public void removeChangeListener(BiConsumer<? super T, ? super T> listener) {
}

@Override
public void set(T v) {
public void set(@Nullable T v) {
T oldV = v;
this.v = v;
changeListeners.forEach(listener -> listener.accept(oldV, v));
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SimpleValue<?> that = (SimpleValue<?>) o;
Expand Down

0 comments on commit 533022f

Please sign in to comment.