Fix more incorrect array nullability annotations (#11836)

This commit is contained in:
Jake Potrebic
2024-12-27 13:24:16 -08:00
committed by GitHub
parent 13c94e40ad
commit ca8709b30f
27 changed files with 61 additions and 77 deletions

View File

@@ -319,7 +319,7 @@ public abstract class JavaPlugin extends PluginBase {
* {@inheritDoc}
*/
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String @NotNull [] args) {
return false;
}
@@ -328,7 +328,7 @@ public abstract class JavaPlugin extends PluginBase {
*/
@Override
@Nullable
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String @NotNull [] args) {
return null;
}

View File

@@ -229,5 +229,5 @@ public interface Messenger {
* @param channel Channel that the message was sent by.
* @param message Raw payload of the message.
*/
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, @NotNull byte[] message);
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, byte @NotNull [] message);
}

View File

@@ -17,5 +17,5 @@ public interface PluginMessageListener {
* @param player Source of the message.
* @param message The raw message that was sent.
*/
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, @NotNull byte[] message);
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, byte @NotNull [] message);
}

View File

@@ -27,7 +27,7 @@ public interface PluginMessageRecipient {
* @throws ChannelNotRegisteredException Thrown if the channel is not
* registered for this plugin.
*/
public void sendPluginMessage(@NotNull Plugin source, @NotNull String channel, @NotNull byte[] message);
public void sendPluginMessage(@NotNull Plugin source, @NotNull String channel, byte @NotNull [] message);
/**
* Gets a set containing all the Plugin Channels that this client is

View File

@@ -439,7 +439,7 @@ public class StandardMessenger implements Messenger {
}
@Override
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, @NotNull byte[] message) {
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, byte @NotNull [] message) {
if (source == null) {
throw new IllegalArgumentException("Player source cannot be null");
}
@@ -534,7 +534,7 @@ public class StandardMessenger implements Messenger {
* @throws ChannelNotRegisteredException Thrown if the channel is not
* registered for this plugin.
*/
public static void validatePluginMessage(@NotNull Messenger messenger, @NotNull Plugin source, @NotNull String channel, @NotNull byte[] message) {
public static void validatePluginMessage(@NotNull Messenger messenger, @NotNull Plugin source, @NotNull String channel, byte @NotNull [] message) {
if (messenger == null) {
throw new IllegalArgumentException("Messenger cannot be null");
}