Switch over to Error Prone (now with NullAway!)

There is one major change: we now have a separate artifact for the annotation processor.

As for NullAway, we are currently exempting the clientbound join game/respawn packets. They are ugly and need to be refactored.
This commit is contained in:
Andrew Steinborn
2021-05-13 04:13:15 -04:00
parent c496d912ea
commit 3c41211163
79 changed files with 494 additions and 401 deletions

View File

@@ -7,6 +7,7 @@ plugins {
apply plugin: 'org.cadixdev.licenser'
apply from: '../gradle/checkstyle.gradle'
apply from: '../gradle/publish.gradle'
apply from: '../gradle/errorprone.gradle'
java {
sourceCompatibility = JavaVersion.VERSION_11

View File

@@ -20,6 +20,7 @@ package com.velocitypowered.natives.util;
import java.util.List;
import java.util.function.BooleanSupplier;
import java.util.function.Supplier;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public final class NativeCodeLoader<T> implements Supplier<T> {
@@ -56,7 +57,7 @@ public final class NativeCodeLoader<T> implements Supplier<T> {
private final Runnable setup;
private final String name;
private final Supplier<T> object;
private T constructed;
private @MonotonicNonNull T constructed;
Variant(BooleanSupplier possiblyAvailable, Runnable setup, String name, T object) {
this(possiblyAvailable, setup, name, () -> object);