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:
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
/**
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user