✨ 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
|
|
@ -68,6 +68,7 @@ public final class CloudInjectionModule<C> extends AbstractModule {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
protected void configure() {
|
||||
final Type commandTreeType = Types.newParameterizedType(CommandTree.class, this.commandSenderType);
|
||||
final Type commandExecutionCoordinatorType = Types.newParameterizedType(CommandExecutionCoordinator.class,
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ public class VelocityCommandManager<C> extends CommandManager<C> {
|
|||
* @param backwardsCommandSenderMapper Function that maps the command sender type to {@link CommandSource}
|
||||
*/
|
||||
@Inject
|
||||
@SuppressWarnings("unchecked")
|
||||
public VelocityCommandManager(
|
||||
final @NonNull ProxyServer proxyServer,
|
||||
final @NonNull Function<@NonNull CommandTree<C>, @NonNull CommandExecutionCoordinator<C>> commandExecutionCoordinator,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||
* Command preprocessor which decorates incoming {@link cloud.commandframework.context.CommandContext}
|
||||
* with Velocity specific objects
|
||||
*
|
||||
* @param <C>
|
||||
* @param <C> Command sender type
|
||||
* @since 1.1.0
|
||||
*/
|
||||
final class VelocityCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ final class VelocityPluginRegistrationHandler<C> implements CommandRegistrationH
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean registerCommand(final @NonNull Command<?> command) {
|
||||
final CommandArgument<?, ?> argument = command.getArguments().get(0);
|
||||
final List<String> aliases = ((StaticArgument<C>) argument).getAlternativeAliases();
|
||||
|
|
|
|||
|
|
@ -179,6 +179,8 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
|
||||
public static final class PlayerParseException extends ParserException {
|
||||
|
||||
private static final long serialVersionUID = -4839583631837040297L;
|
||||
|
||||
private PlayerParseException(
|
||||
final @NonNull String input,
|
||||
final @NonNull CommandContext<?> context
|
||||
|
|
|
|||
|
|
@ -172,6 +172,8 @@ public final class ServerArgument<C> extends CommandArgument<C, RegisteredServer
|
|||
|
||||
public static final class ServerParseException extends ParserException {
|
||||
|
||||
private static final long serialVersionUID = 9168156226853233788L;
|
||||
|
||||
private ServerParseException(
|
||||
final @NonNull String input,
|
||||
final @NonNull CommandContext<?> context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue