updated method signature annotations to accurately reflect behavior

This commit is contained in:
Samuel Pizette
2022-12-06 03:42:34 -05:00
parent a371d314b8
commit a87f675269

View File

@@ -107,7 +107,7 @@ public interface CommandBase {
* @return Returns the object given or throws an exception
* @throws NotificationException exception thrown when null
*/
default @Nullable <T> T notifyNull(@Nullable T obj, @NotNull String key)
default @NotNull <T> T notifyNull(@Nullable T obj, @NotNull String key)
throws NotificationException {
if (Objects.isNull(obj)) {
throw new NotificationException(key);
@@ -155,7 +155,7 @@ public interface CommandBase {
* @return Returns the player
* @throws NotificationException exception thrown when invalid playerName
*/
default @Nullable Player notifyPlayerRequired(@NotNull String playerName,
default @NotNull Player notifyPlayerRequired(@NotNull String playerName,
@NotNull String key)
throws NotificationException {