Skip to content

Commit

Permalink
feat(PairDocument): Changed from ObjectMap.Pair<Object, Object> to Ob…
Browse files Browse the repository at this point in the history
…jectMap.Pair<K, V>
  • Loading branch information
GeorgeV220 committed Apr 8, 2023
1 parent 24fa0a4 commit d1f23bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maps/src/main/java/com/georgev22/library/maps/ObjectMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public int hashCode() {
}
}

record PairDocument(ObjectMap.Pair<Object, Object>... objectPairs) implements Serializable {
record PairDocument<K, V>(ObjectMap.Pair<K, V>... objectPairs) implements Serializable {


@SafeVarargs
Expand Down Expand Up @@ -653,7 +653,7 @@ public <T> T get(final Object key, final T defaultValue) {
value.set(objectPair.value());
}
});
return value == null ? null : (T) value.get();
return value.get() == null ? null : (T) value.get();
}

@Contract(pure = true)
Expand Down

0 comments on commit d1f23bc

Please sign in to comment.