From cc3441dfeb1b7eb819497b28931ee697a631f198 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 23 Dec 2012 18:52:00 +0100 Subject: [PATCH] Continue to remove unnecessary raw types. --- .../com/comphenix/protocol/wrappers/BukkitConverters.java | 4 +--- .../java/com/comphenix/protocol/wrappers/ChunkPosition.java | 1 - .../comphenix/protocol/wrappers/WrappedWatchableObject.java | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/BukkitConverters.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/BukkitConverters.java index 7b9bfe49..d8da3e31 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/BukkitConverters.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/BukkitConverters.java @@ -155,7 +155,6 @@ public class BukkitConverters { return null; return getIgnoreNull(new EquivalentConverter() { - @SuppressWarnings("unchecked") @Override public Object getGeneric(Class genericType, WorldType specific) { try { @@ -169,8 +168,7 @@ public class BukkitConverters { throw new FieldAccessException("Cannot find the WorldType.getType() method.", e); } } - - @SuppressWarnings("unchecked") + @Override public WorldType getSpecific(Object generic) { try { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/ChunkPosition.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/ChunkPosition.java index f9e60fa1..718f227f 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/ChunkPosition.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/ChunkPosition.java @@ -133,7 +133,6 @@ public class ChunkPosition { */ public static EquivalentConverter getConverter() { return new EquivalentConverter() { - @SuppressWarnings("unchecked") @Override public Object getGeneric(Class genericType, ChunkPosition specific) { if (chunkPositionConstructor == null) { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java index c3af7039..003385d1 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java @@ -49,7 +49,6 @@ public class WrappedWatchableObject { * @param index - the index. * @param value - non-null value of specific types. */ - @SuppressWarnings("unchecked") public WrappedWatchableObject(int index, Object value) { if (value == null) throw new IllegalArgumentException("Value cannot be NULL."); @@ -296,8 +295,8 @@ public class WrappedWatchableObject { * @throws FieldAccessException If we're unable to use reflection. */ public WrappedWatchableObject deepClone() throws FieldAccessException { - @SuppressWarnings("unchecked") - WrappedWatchableObject clone = new WrappedWatchableObject(DefaultInstances.DEFAULT.getDefault(MinecraftReflection.getWatchableObjectClass())); + WrappedWatchableObject clone = new WrappedWatchableObject( + DefaultInstances.DEFAULT.getDefault(MinecraftReflection.getWatchableObjectClass())); clone.setDirtyState(getDirtyState()); clone.setIndex(getIndex());