Add errorprone and fix warnings/errors

The compiler will also treat all warnings as errors from now on.
This commit is contained in:
Alexander Söderberg 2020-10-23 10:20:45 +02:00 committed by Alexander Söderberg
parent 6ffee9d04f
commit cfac2639ad
101 changed files with 309 additions and 146 deletions

View file

@ -588,6 +588,8 @@ public final class MinecraftHelp<C> {
}
/**
* Get the configured primary color
*
* @return The primary color for the color scheme
*/
public @NonNull TextColor primary() {
@ -595,6 +597,8 @@ public final class MinecraftHelp<C> {
}
/**
* Get the configured highlight color
*
* @return The primary color used to highlight commands and queries
*/
public @NonNull TextColor highlight() {
@ -602,6 +606,8 @@ public final class MinecraftHelp<C> {
}
/**
* Get the configured alternate highlight color
*
* @return The secondary color used to highlight commands and queries
*/
public @NonNull TextColor alternateHighlight() {
@ -609,6 +615,8 @@ public final class MinecraftHelp<C> {
}
/**
* Get the configured text color
*
* @return The color used for description text
*/
public @NonNull TextColor text() {
@ -616,6 +624,8 @@ public final class MinecraftHelp<C> {
}
/**
* Get the configured accent color
*
* @return The color used for accents and symbols
*/
public @NonNull TextColor accent() {
@ -623,6 +633,8 @@ public final class MinecraftHelp<C> {
}
/**
* Create a new {@link HelpColors} instance
*
* @param primary The primary color for the color scheme
* @param highlight The primary color used to highlight commands and queries
* @param alternateHighlight The secondary color used to highlight commands and queries

View file

@ -50,7 +50,7 @@ final class Pagination<T> {
this.outOfRangeRenderer = outOfRangeRenderer;
}
public @NonNull List<Component> render(
@NonNull List<Component> render(
final @NonNull List<T> content,
final int page,
final int itemsPerPage
@ -73,7 +73,7 @@ final class Pagination<T> {
renderedContent.add(this.footerRenderer.apply(page, pages));
return renderedContent;
return Collections.unmodifiableList(renderedContent);
}
}

View file

@ -218,6 +218,8 @@ public final class TextColorArgument<C> extends CommandArgument<C, TextColor> {
private static final class TextColorParseException extends ParserException {
private static final long serialVersionUID = -6236625328843879518L;
private TextColorParseException(
final @NonNull CommandContext<?> commandContext,
final @NonNull String input