Add checkerframework compilation checking (#109)

* Reorder nullability annotations again

* Add checker validation to API module

* Add checker validation to Common module

* Begin checker validation for Bukkit module

* It compiles!
This commit is contained in:
Josh (Vicarious) authored and GitHub committed 2020-10-24 01:02:57 -07:00
1 parent 3314a51df8
commit d9ab711adc
83 files changed
+1127 -717

No files matched your search

@@ -15,18 +15,20 @@ public interface PlayerUser extends CarbonUser {
boolean online();
@Nullable String nickname();
@NonNull String nickname();
default void nickname(@Nullable final String nickname) {
default void nickname(final @Nullable String nickname) {
this.nickname(nickname, false);
}
void nickname(@Nullable String nickname, boolean fromRemote);
@Nullable String displayName();
@NonNull String displayName();
void displayName(@Nullable String displayName);
@NonNull String name();
@NonNull String parsePlaceholders(@NonNull String input);
@NonNull UserChannelSettings channelSettings(@NonNull ChatChannel channel);
@@ -59,37 +61,45 @@ public interface PlayerUser extends CarbonUser {
@Nullable UUID replyTarget();
default void replyTarget(@Nullable final UUID target) {
default void replyTarget(final @Nullable UUID target) {
this.replyTarget(target, false);
}
default void replyTarget(@Nullable final PlayerUser user) {
this.replyTarget(user.uuid(), false);
default void replyTarget(final @Nullable PlayerUser user) {
if (user == null) {
this.replyTarget((UUID) null, false);
} else {
this.replyTarget(user.uuid(), false);
}
}
void replyTarget(@Nullable UUID target, boolean fromRemote);
default void replyTarget(@Nullable final PlayerUser user, final boolean fromRemote) {
this.replyTarget(user.uuid(), fromRemote);
default void replyTarget(final @Nullable PlayerUser user, final boolean fromRemote) {
if (user == null) {
this.replyTarget((UUID) null, fromRemote);
} else {
this.replyTarget(user.uuid(), fromRemote);
}
}
boolean ignoringUser(@NonNull UUID uuid);
void ignoringUser(@NonNull UUID uuid, boolean ignoring, boolean fromRemote);
default void ignoringUser(@NonNull final UUID uuid, final boolean ignoring) {
default void ignoringUser(final @NonNull UUID uuid, final boolean ignoring) {
this.ignoringUser(uuid, ignoring, false);
}
default boolean ignoringUser(@NonNull final PlayerUser user) {
default boolean ignoringUser(final @NonNull PlayerUser user) {
return this.ignoringUser(user.uuid());
}
default void ignoringUser(@NonNull final PlayerUser user, final boolean ignoring, final boolean fromRemote) {
default void ignoringUser(final @NonNull PlayerUser user, final boolean ignoring, final boolean fromRemote) {
this.ignoringUser(user.uuid(), ignoring, fromRemote);
}
default void ignoringUser(@NonNull final PlayerUser user, final boolean ignoring) {
default void ignoringUser(final @NonNull PlayerUser user, final boolean ignoring) {
this.ignoringUser(user.uuid(), ignoring, false);
}
@@ -97,19 +107,19 @@ public interface PlayerUser extends CarbonUser {
@NonNull Iterable<UUID> ignoredUsers();
boolean hasGroup(@NonNull final String group);
boolean hasGroup(final @NonNull String group);
boolean hasGroup(@NonNull final Group group);
boolean hasGroup(final @NonNull Group group);
@NonNull Collection<@NonNull Group> groups();
@Nullable Group primaryGroup();
void sendMessage(@NonNull final PlayerUser sender, @NonNull String message);
void sendMessage(final @NonNull PlayerUser sender, @NonNull String message);
@Nullable ChatChannel selectedChannel();
default void selectedChannel(@NonNull final ChatChannel channel) {
default void selectedChannel(final @NonNull ChatChannel channel) {
this.selectedChannel(channel, false);
}
@@ -24,7 +24,7 @@ public interface UserChannelSettings {
@Nullable
TextColor color();
default void color(@Nullable final TextColor color) {
default void color(final @Nullable TextColor color) {
this.color(color, false);
}
@@ -10,7 +10,7 @@ public interface UserService<T extends PlayerUser> {
@Nullable
UUID resolve(String name);
@Nullable
@NonNull
T wrap(UUID uuid);
@Nullable // Maybe NonNull?