Remove nullability annotations from enum constructors

By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
Bukkit/Spigot 2019-03-14 11:28:51 +01:00
parent 416c865476
commit 9bd8e66c7d
17 changed files with 22 additions and 22 deletions

View file

@ -50,7 +50,7 @@ public enum Achievement {
parent = null;
}
private Achievement(@Nullable Achievement parent) {
private Achievement(/*@Nullable*/ Achievement parent) {
this.parent = parent;
}

View file

@ -85,7 +85,7 @@ public enum DyeColor {
private final static Map<Color, DyeColor> BY_COLOR;
private final static Map<Color, DyeColor> BY_FIREWORK;
private DyeColor(final int woolData, final int dyeData, @NotNull Color color, @NotNull Color firework) {
private DyeColor(final int woolData, final int dyeData, /*@NotNull*/ Color color, /*@NotNull*/ Color firework) {
this.woolData = (byte) woolData;
this.dyeData = (byte) dyeData;
this.color = color;

View file

@ -205,11 +205,11 @@ public enum Effect {
private final Class<?> data;
private static final Map<Integer, Effect> BY_ID = Maps.newHashMap();
Effect(int id, @NotNull Type type) {
Effect(int id, /*@NotNull*/ Type type) {
this(id, type, null);
}
Effect(int id, @NotNull Type type, @Nullable Class<?> data) {
Effect(int id, /*@NotNull*/ Type type, /*@Nullable*/ Class<?> data) {
this.id = id;
this.type = type;
this.data = data;

View file

@ -155,7 +155,7 @@ public enum EntityEffect {
private final Class<? extends Entity> applicable;
private final static Map<Byte, EntityEffect> BY_DATA = Maps.newHashMap();
EntityEffect(final int data, @NotNull Class<? extends Entity> clazz) {
EntityEffect(final int data, /*@NotNull*/ Class<? extends Entity> clazz) {
this.data = (byte) data;
this.applicable = clazz;
}

View file

@ -2957,15 +2957,15 @@ public enum Material implements Keyed {
this(id, stack, durability, MaterialData.class);
}
private Material(final int id, @NotNull final Class<?> data) {
private Material(final int id, /*@NotNull*/ final Class<?> data) {
this(id, 64, data);
}
private Material(final int id, final int stack, @NotNull final Class<?> data) {
private Material(final int id, final int stack, /*@NotNull*/ final Class<?> data) {
this(id, stack, 0, data);
}
private Material(final int id, final int stack, final int durability, @NotNull final Class<?> data) {
private Material(final int id, final int stack, final int durability, /*@NotNull*/ final Class<?> data) {
this.id = id;
this.durability = (short) durability;
this.maxStack = stack;

View file

@ -71,7 +71,7 @@ public enum Particle {
dataType = Void.class;
}
Particle(@NotNull Class<?> data) {
Particle(/*@NotNull*/ Class<?> data) {
dataType = data;
}

View file

@ -82,7 +82,7 @@ public enum Statistic {
this(Type.UNTYPED);
}
private Statistic(@NotNull Type type) {
private Statistic(/*@NotNull*/ Type type) {
this.type = type;
}

View file

@ -21,7 +21,7 @@ public enum WorldType {
private final static Map<String, WorldType> BY_NAME = Maps.newHashMap();
private final String name;
private WorldType(@NotNull String name) {
private WorldType(/*@NotNull*/ String name) {
this.name = name;
}

View file

@ -57,7 +57,7 @@ public enum PatternType {
}
}
private PatternType(@NotNull String key) {
private PatternType(/*@NotNull*/ String key) {
this.identifier = key;
}

View file

@ -311,11 +311,11 @@ public enum EntityType {
NAME_MAP.put("ender_crystal", ENDER_CRYSTAL);
}
private EntityType(@Nullable String name, @Nullable Class<? extends Entity> clazz, int typeId) {
private EntityType(/*@Nullable*/ String name, /*@Nullable*/ Class<? extends Entity> clazz, int typeId) {
this(name, clazz, typeId, true);
}
private EntityType(@Nullable String name, @Nullable Class<? extends Entity> clazz, int typeId, boolean independent) {
private EntityType(/*@Nullable*/ String name, /*@Nullable*/ Class<? extends Entity> clazz, int typeId, boolean independent) {
this.name = name;
this.clazz = clazz;
this.typeId = (short) typeId;

View file

@ -236,7 +236,7 @@ public interface Villager extends Ageable, NPC, InventoryHolder, Merchant {
private static final Multimap<Profession, Career> careerMap = LinkedListMultimap.create();
private final Profession profession;
private Career(@NotNull Profession profession) {
private Career(/*@NotNull*/ Profession profession) {
this.profession = profession;
}

View file

@ -98,11 +98,11 @@ public enum InventoryType {
private final String title;
private final boolean isCreatable;
private InventoryType(int defaultSize, @NotNull String defaultTitle) {
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
this(defaultSize, defaultTitle, true);
}
private InventoryType(int defaultSize, @NotNull String defaultTitle, boolean isCreatable) {
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle, boolean isCreatable) {
size = defaultSize;
title = defaultTitle;
this.isCreatable = isCreatable;

View file

@ -101,7 +101,7 @@ public abstract class InventoryView {
REPAIR_COST(0, InventoryType.ANVIL);
int id;
InventoryType style;
private Property(int id, @NotNull InventoryType appliesTo) {
private Property(int id, /*@NotNull*/ InventoryType appliesTo) {
this.id = id;
style = appliesTo;
}

View file

@ -119,7 +119,7 @@ public enum LootTables implements Keyed {
private final String location;
private LootTables(@NotNull String location) {
private LootTables(/*@NotNull*/ String location) {
this.location = location;
}

View file

@ -72,7 +72,7 @@ public enum MushroomBlockTexture {
private final Byte data;
private final BlockFace capFace;
private MushroomBlockTexture(final int data, @Nullable final BlockFace capFace) {
private MushroomBlockTexture(final int data, /*@Nullable*/ final BlockFace capFace) {
this.data = (byte) data;
this.capFace = capFace;
}

View file

@ -18,7 +18,7 @@ public enum PermissionDefault {
private final String[] names;
private final static Map<String, PermissionDefault> lookup = new HashMap<String, PermissionDefault>();
private PermissionDefault(@NotNull String... names) {
private PermissionDefault(/*@NotNull*/ String... names) {
this.names = names;
}

View file

@ -35,7 +35,7 @@ public enum PotionType {
private final boolean upgradeable;
private final boolean extendable;
PotionType(@Nullable PotionEffectType effect, boolean upgradeable, boolean extendable) {
PotionType(/*@Nullable*/ PotionEffectType effect, boolean upgradeable, boolean extendable) {
this.effect = effect;
this.upgradeable = upgradeable;
this.extendable = extendable;