Generic cleaning

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot
2012-01-15 14:37:30 +01:00
parent 8377ee22f8
commit 4c80a49933
61 changed files with 245 additions and 272 deletions

View File

@@ -1,7 +1,5 @@
package org.bukkit.configuration;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import java.io.File;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;

View File

@@ -56,7 +56,6 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
* but you may include one if you wish for extra spacing.
* <p>
* Null is a valid value which will indicate that no header is to be applied.
*
*
* @param value New header
* @return This object, for chaining

View File

@@ -12,11 +12,8 @@ import org.bukkit.Bukkit;
import org.bukkit.configuration.Configuration;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.configuration.serialization.ConfigurationSerialization;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.error.YAMLException;
import org.yaml.snakeyaml.representer.Representer;

View File

@@ -17,6 +17,7 @@ public class YamlConstructor extends SafeConstructor {
}
private class ConstructCustomObject extends ConstructYamlMap {
@Override
public Object construct(Node node) {
if (node.isTwoStepsConstruction()) {
throw new YAMLException("Unexpected referential mapping structure. Node: " + node);
@@ -40,6 +41,7 @@ public class YamlConstructor extends SafeConstructor {
return raw;
}
@Override
public void construct2ndStep(Node node, Object object) {
throw new YAMLException("Unexpected referential mapping structure. Node: " + node);
}

View File

@@ -1,4 +1,3 @@
package org.bukkit.configuration.file;
import java.util.LinkedHashMap;
@@ -9,7 +8,6 @@ import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.configuration.serialization.ConfigurationSerialization;
import org.yaml.snakeyaml.nodes.Node;
import org.yaml.snakeyaml.representer.Represent;
import org.yaml.snakeyaml.representer.Representer;
public class YamlRepresenter extends Representer {
@@ -20,6 +18,7 @@ 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,6 +26,7 @@ public class YamlRepresenter extends Representer {
}
private class RepresentConfigurationSerializable extends RepresentMap {
@Override
@SuppressWarnings("unchecked")
public Node representData(Object data) {
ConfigurationSerializable serializable = (ConfigurationSerializable) data;