13
0
geforkt von Mirrors/Velocity

Remove old Checker Framework relics.

Proper Checker Framework support needs to wait for a major Velocity version and almost necessities a total refactor, if not rewrite, of Velocity.
Dieser Commit ist enthalten in:
Andrew Steinborn 2020-06-11 02:08:04 -04:00
Ursprung cf5f7fa38f
Commit 9bece076f5

Datei anzeigen

@ -120,12 +120,12 @@ public class VelocityServer implements ProxyServer {
} }
public KeyPair getServerKeyPair() { public KeyPair getServerKeyPair() {
return ensureInitialized(serverKeyPair); return serverKeyPair;
} }
@Override @Override
public VelocityConfiguration getConfiguration() { public VelocityConfiguration getConfiguration() {
return ensureInitialized(this.configuration); return this.configuration;
} }
@Override @Override
@ -229,7 +229,6 @@ public class VelocityServer implements ProxyServer {
Metrics.VelocityMetrics.startMetrics(this, configuration.getMetrics()); Metrics.VelocityMetrics.startMetrics(this, configuration.getMetrics());
} }
@RequiresNonNull({"pluginManager", "eventManager"})
private void loadPlugins() { private void loadPlugins() {
logger.info("Loading plugins..."); logger.info("Loading plugins...");
@ -443,18 +442,11 @@ public class VelocityServer implements ProxyServer {
} }
public AsyncHttpClient getAsyncHttpClient() { public AsyncHttpClient getAsyncHttpClient() {
return ensureInitialized(cm).getHttpClient(); return cm.getHttpClient();
} }
public Ratelimiter getIpAttemptLimiter() { public Ratelimiter getIpAttemptLimiter() {
return ensureInitialized(ipAttemptLimiter); return ipAttemptLimiter;
}
private static <T> T ensureInitialized(T o) {
if (o == null) {
throw new IllegalStateException("The proxy isn't fully initialized.");
}
return o;
} }
/** /**