Updated log4j and Checker Framework
Updating Checker Framework flagged numerous warnings, which have been corrected. These probably involve type declarations lacking a nullness annotation that appeared elsewhere.
This commit is contained in:
@@ -3,7 +3,6 @@ package com.velocitypowered.api.event.query;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.velocitypowered.api.proxy.server.QueryResponse;
|
||||
import java.net.InetAddress;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* This event is fired if proxy is getting queried over GS4 Query protocol.
|
||||
@@ -32,7 +31,6 @@ public final class ProxyQueryEvent {
|
||||
*
|
||||
* @return query type
|
||||
*/
|
||||
@NonNull
|
||||
public QueryType getQueryType() {
|
||||
return queryType;
|
||||
}
|
||||
@@ -42,7 +40,6 @@ public final class ProxyQueryEvent {
|
||||
*
|
||||
* @return querier address
|
||||
*/
|
||||
@NonNull
|
||||
public InetAddress getQuerierAddress() {
|
||||
return querierAddress;
|
||||
}
|
||||
@@ -52,7 +49,6 @@ public final class ProxyQueryEvent {
|
||||
*
|
||||
* @return the current query response
|
||||
*/
|
||||
@NonNull
|
||||
public QueryResponse getResponse() {
|
||||
return response;
|
||||
}
|
||||
@@ -62,7 +58,7 @@ public final class ProxyQueryEvent {
|
||||
*
|
||||
* @param response the new non-null query response
|
||||
*/
|
||||
public void setResponse(@NonNull QueryResponse response) {
|
||||
public void setResponse(QueryResponse response) {
|
||||
this.response = Preconditions.checkNotNull(response, "response");
|
||||
}
|
||||
|
||||
|
@@ -14,8 +14,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
public final class PluginDependency {
|
||||
|
||||
private final String id;
|
||||
@Nullable
|
||||
private final String version;
|
||||
private final @Nullable String version;
|
||||
|
||||
private final boolean optional;
|
||||
|
||||
|
@@ -219,21 +219,11 @@ public final class QueryResponse {
|
||||
* A builder for {@link QueryResponse} objects.
|
||||
*/
|
||||
public static final class Builder {
|
||||
|
||||
@MonotonicNonNull
|
||||
private String hostname;
|
||||
|
||||
@MonotonicNonNull
|
||||
private String gameVersion;
|
||||
|
||||
@MonotonicNonNull
|
||||
private String map;
|
||||
|
||||
@MonotonicNonNull
|
||||
private String proxyHost;
|
||||
|
||||
@MonotonicNonNull
|
||||
private String proxyVersion;
|
||||
private @MonotonicNonNull String hostname;
|
||||
private @MonotonicNonNull String gameVersion;
|
||||
private @MonotonicNonNull String map;
|
||||
private @MonotonicNonNull String proxyHost;
|
||||
private @MonotonicNonNull String proxyVersion;
|
||||
|
||||
private int currentPlayers;
|
||||
private int maxPlayers;
|
||||
|
Reference in New Issue
Block a user