diff options
Diffstat (limited to 'src/main/java')
10 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java index 14b2c297..f0d79106 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java @@ -4,7 +4,6 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.util.LinkedHashMap; import java.util.Map; import java.util.logging.Level; @@ -29,8 +28,6 @@ public class YamlConfiguration extends FileConfiguration { @Override public String saveToString() { - Map<String, Object> output = new LinkedHashMap<String, Object>(); - yamlOptions.setIndent(options().indent()); yamlOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); yamlRepresenter.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); @@ -45,6 +42,7 @@ public class YamlConfiguration extends FileConfiguration { return header + dump; } + @SuppressWarnings("unchecked") @Override public void loadFromString(String contents) throws InvalidConfigurationException { if (contents == null) { @@ -70,6 +68,7 @@ public class YamlConfiguration extends FileConfiguration { } } + @SuppressWarnings("unchecked") protected void convertMapsToSections(Map<Object, Object> input, ConfigurationSection section) { for (Map.Entry<Object, Object> entry : input.entrySet()) { String key = entry.getKey().toString(); diff --git a/src/main/java/org/bukkit/configuration/file/YamlConstructor.java b/src/main/java/org/bukkit/configuration/file/YamlConstructor.java index 9e6e1d2d..7df59fb2 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlConstructor.java +++ b/src/main/java/org/bukkit/configuration/file/YamlConstructor.java @@ -23,6 +23,7 @@ public class YamlConstructor extends SafeConstructor { throw new YAMLException("Unexpected referential mapping structure. Node: " + node); } + @SuppressWarnings("unchecked") Map<Object, Object> raw = (Map<Object, Object>) super.construct(node); if (raw.containsKey(ConfigurationSerialization.SERIALIZED_TYPE_KEY)) { diff --git a/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java b/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java index 817e66f1..bc9c098d 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java +++ b/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java @@ -19,7 +19,6 @@ public class YamlRepresenter extends Representer { private class RepresentConfigurationSection extends RepresentMap { @Override - @SuppressWarnings("unchecked") public Node representData(Object data) { return super.representData(((ConfigurationSection) data).getValues(false)); } @@ -27,7 +26,6 @@ public class YamlRepresenter extends Representer { private class RepresentConfigurationSerializable extends RepresentMap { @Override - @SuppressWarnings("unchecked") public Node representData(Object data) { ConfigurationSerializable serializable = (ConfigurationSerializable) data; Map<String, Object> values = new LinkedHashMap<String, Object>(); diff --git a/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java b/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java index 7087661d..d1b3cdbd 100644 --- a/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java +++ b/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java @@ -12,6 +12,7 @@ import org.bukkit.entity.Entity; * <li>Snow formed by a {@link org.bukkit.entity.Snowman}.</li> * </ul> */ +@SuppressWarnings("serial") public class EntityBlockFormEvent extends BlockFormEvent { private Entity entity; diff --git a/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java b/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java index f798559d..91cebc8b 100644 --- a/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java @@ -10,6 +10,7 @@ import org.bukkit.event.HandlerList; /** * Thrown when a Living Entity creates a portal in a world. */ +@SuppressWarnings("serial") public class EntityCreatePortalEvent extends EntityEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private List<BlockState> blocks; diff --git a/src/main/java/org/bukkit/event/entity/ItemDespawnEvent.java b/src/main/java/org/bukkit/event/entity/ItemDespawnEvent.java index 2d55b853..b0200c1d 100644 --- a/src/main/java/org/bukkit/event/entity/ItemDespawnEvent.java +++ b/src/main/java/org/bukkit/event/entity/ItemDespawnEvent.java @@ -5,6 +5,7 @@ import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; +@SuppressWarnings("serial") public class ItemDespawnEvent extends EntityEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean canceled; diff --git a/src/main/java/org/bukkit/plugin/messaging/ChannelNameTooLongException.java b/src/main/java/org/bukkit/plugin/messaging/ChannelNameTooLongException.java index 76e06fc1..80ef8a2a 100644 --- a/src/main/java/org/bukkit/plugin/messaging/ChannelNameTooLongException.java +++ b/src/main/java/org/bukkit/plugin/messaging/ChannelNameTooLongException.java @@ -3,6 +3,7 @@ package org.bukkit.plugin.messaging; /** * Thrown if a Plugin Channel is too long. */ +@SuppressWarnings("serial") public class ChannelNameTooLongException extends RuntimeException { public ChannelNameTooLongException() { super("Attempted to send a Plugin Message to a channel that was too large. The maximum length a channel may be is " + Messenger.MAX_CHANNEL_SIZE + " chars."); diff --git a/src/main/java/org/bukkit/plugin/messaging/ChannelNotRegisteredException.java b/src/main/java/org/bukkit/plugin/messaging/ChannelNotRegisteredException.java index a7a568e9..c3a797dc 100644 --- a/src/main/java/org/bukkit/plugin/messaging/ChannelNotRegisteredException.java +++ b/src/main/java/org/bukkit/plugin/messaging/ChannelNotRegisteredException.java @@ -3,6 +3,7 @@ package org.bukkit.plugin.messaging; /** * Thrown if a Plugin attempts to send a message on an unregistered channel. */ +@SuppressWarnings("serial") public class ChannelNotRegisteredException extends RuntimeException { public ChannelNotRegisteredException() { this("Attempted to send a plugin message through an unregistered channel."); diff --git a/src/main/java/org/bukkit/plugin/messaging/MessageTooLargeException.java b/src/main/java/org/bukkit/plugin/messaging/MessageTooLargeException.java index 3a195c05..61af8c4c 100644 --- a/src/main/java/org/bukkit/plugin/messaging/MessageTooLargeException.java +++ b/src/main/java/org/bukkit/plugin/messaging/MessageTooLargeException.java @@ -3,6 +3,7 @@ package org.bukkit.plugin.messaging; /** * Thrown if a Plugin Message is sent that is too large to be sent. */ +@SuppressWarnings("serial") public class MessageTooLargeException extends RuntimeException { public MessageTooLargeException() { this("Attempted to send a plugin message that was too large. The maximum length a plugin message may be is " + Messenger.MAX_MESSAGE_SIZE + " bytes."); diff --git a/src/main/java/org/bukkit/plugin/messaging/ReservedChannelException.java b/src/main/java/org/bukkit/plugin/messaging/ReservedChannelException.java index 8b20b41a..7cf7845e 100644 --- a/src/main/java/org/bukkit/plugin/messaging/ReservedChannelException.java +++ b/src/main/java/org/bukkit/plugin/messaging/ReservedChannelException.java @@ -3,6 +3,7 @@ package org.bukkit.plugin.messaging; /** * Thrown if a plugin attempts to register for a reserved channel (such as "REGISTER") */ +@SuppressWarnings("serial") public class ReservedChannelException extends RuntimeException { public ReservedChannelException() { this("Attempted to register for a reserved channel name."); |