mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 14:37:43 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user