Skip to content

Commit

Permalink
api: Fix typo in deserializeOrNull
Browse files Browse the repository at this point in the history
  • Loading branch information
kezz committed May 6, 2021
1 parent b909022 commit 38fa91f
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,25 @@ public interface ComponentSerializer<I extends Component, O extends Component, R
* @param input the input
* @return the component if {@code input} is non-null, otherwise {@code null}
* @since 4.7.0
* @deprecated Use {@link #deserializeOrNull(Object)}
*/
@Deprecated
@Contract(value = "!null -> !null; null -> null", pure = true)
default @PolyNull O deseializeOrNull(final @PolyNull R input) {
return this.deserializeOrNull(input);
}

/**
* Deserialize a component from input of type {@code R}.
*
* <p>If {@code input} is {@code null}, then {@code null} will be returned.</p>
*
* @param input the input
* @return the component if {@code input} is non-null, otherwise {@code null}
* @since 4.8.0
*/
@Contract(value = "!null -> !null; null -> null", pure = true)
default @PolyNull O deserializeOrNull(final @PolyNull R input) {
return this.deserializeOr(input, null);
}

Expand Down

0 comments on commit 38fa91f

Please sign in to comment.