1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-01 01:57:55 +00:00

Fix usages of javax's Nullable annotation

This commit is contained in:
Jonathan Coates
2025-03-16 16:29:19 +00:00
parent b03546a158
commit 7c1e8e1951
3 changed files with 3 additions and 3 deletions

View File

@@ -14,8 +14,8 @@ import dan200.computercraft.shared.media.items.DiskItem;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.item.ItemStack;
import org.jspecify.annotations.Nullable;
import javax.annotation.Nullable;
import java.util.function.Supplier;
import java.util.function.ToIntFunction;

View File

@@ -10,8 +10,8 @@ import dan200.computercraft.api.media.IMedia;
import dan200.computercraft.core.filesystem.SubMount;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.item.ItemStack;
import org.jspecify.annotations.Nullable;
import javax.annotation.Nullable;
import java.io.IOException;
/**

View File

@@ -38,7 +38,7 @@ class ForbiddenImport : BugChecker(), BugChecker.ImportTreeMatcher {
companion object {
private val ALTERNATIVE_IMPORTS = mapOf(
// Ban JSR 305 and JetBrains @Nullable, and prefer the JSpecify one.
"org.javax.annotation.Nullable" to "org.jspecify.annotations.Nullable",
"javax.annotation.Nullable" to "org.jspecify.annotations.Nullable",
"org.jetbrains.annotations.Nullable" to "org.jspecify.annotations.Nullable",
// Prefer ErrorProne annotations over JSR ones.
"javax.annotation.CheckReturnValue" to "com.google.errorprone.annotations.CheckReturnValue",