✨ Add errorprone and fix warnings/errors
The compiler will also treat all warnings as errors from now on.
This commit is contained in:
parent
6ffee9d04f
commit
cfac2639ad
101 changed files with 309 additions and 146 deletions
|
|
@ -48,7 +48,6 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
|
|||
|
||||
private final CommandArgument<C, ?> command;
|
||||
private final CloudburstCommandManager<C> manager;
|
||||
private final Command<C> cloudCommand;
|
||||
|
||||
CloudburstCommand(
|
||||
final @NonNull String label,
|
||||
|
|
@ -64,7 +63,6 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
|
|||
.build());
|
||||
this.command = command;
|
||||
this.manager = manager;
|
||||
this.cloudCommand = cloudCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -83,7 +81,7 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
|
|||
sender,
|
||||
builder.toString()
|
||||
)
|
||||
.whenComplete(((commandResult, throwable) -> {
|
||||
.whenComplete((commandResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
if (throwable instanceof CompletionException) {
|
||||
throwable = throwable.getCause();
|
||||
|
|
@ -131,7 +129,7 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
|
|||
throwable.printStackTrace();
|
||||
}
|
||||
}
|
||||
}));
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class CloudburstCommandManager<C> extends CommandManager<C> {
|
|||
* @param commandSenderMapper Function that maps {@link CommandSender} to the command sender type
|
||||
* @param backwardsCommandSenderMapper Function that maps the command sender type to {@link CommandSender}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public CloudburstCommandManager(
|
||||
final @NonNull Plugin owningPlugin,
|
||||
final @NonNull Function<@NonNull CommandTree<C>,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class CloudburstPluginRegistrationHandler<C> implements CommandRegistrationHandl
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public final boolean registerCommand(final @NonNull Command<?> command) {
|
||||
/* We only care about the root command argument */
|
||||
final CommandArgument<?, ?> commandArgument = command.getArguments().get(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue