diff options
author | Wesley Wolfe <weswolf@aol.com> | 2013-04-25 03:53:54 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-08-06 18:19:15 -0500 |
commit | 5ebcf56b9bd8d3e773316003003294fdfd51393a (patch) | |
tree | a6b18cf59c057064a4959e4ace22e2ed5b4bbd78 /src/main/java/org | |
parent | 67436f89bbea77059f0c73c35f053ce0f0cd017b (diff) | |
download | bukkit-5ebcf56b9bd8d3e773316003003294fdfd51393a.tar bukkit-5ebcf56b9bd8d3e773316003003294fdfd51393a.tar.gz bukkit-5ebcf56b9bd8d3e773316003003294fdfd51393a.tar.lz bukkit-5ebcf56b9bd8d3e773316003003294fdfd51393a.tar.xz bukkit-5ebcf56b9bd8d3e773316003003294fdfd51393a.zip |
Relax generic types for ConfigurationSerialization
The method signatures are unnecessarily strict for the generic signatures.
This change may cause a compile-time error for extending classes overriding
methods, but no byte signature or compile time call signatures change.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java b/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java index 665c347c..e6a07f95 100644 --- a/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java +++ b/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java @@ -68,7 +68,7 @@ public class ConfigurationSerialization { } } - protected ConfigurationSerializable deserializeViaMethod(Method method, Map<String, Object> args) { + protected ConfigurationSerializable deserializeViaMethod(Method method, Map<String, ?> args) { try { ConfigurationSerializable result = (ConfigurationSerializable) method.invoke(null, args); @@ -87,7 +87,7 @@ public class ConfigurationSerialization { return null; } - protected ConfigurationSerializable deserializeViaCtor(Constructor<? extends ConfigurationSerializable> ctor, Map<String, Object> args) { + protected ConfigurationSerializable deserializeViaCtor(Constructor<? extends ConfigurationSerializable> ctor, Map<String, ?> args) { try { return ctor.newInstance(args); } catch (Throwable ex) { @@ -100,7 +100,7 @@ public class ConfigurationSerialization { return null; } - public ConfigurationSerializable deserialize(Map<String, Object> args) { + public ConfigurationSerializable deserialize(Map<String, ?> args) { Validate.notNull(args, "Args must not be null"); ConfigurationSerializable result = null; @@ -146,7 +146,7 @@ public class ConfigurationSerialization { * @param clazz Class to deserialize into * @return New instance of the specified class */ - public static ConfigurationSerializable deserializeObject(Map<String, Object> args, Class<? extends ConfigurationSerializable> clazz) { + public static ConfigurationSerializable deserializeObject(Map<String, ?> args, Class<? extends ConfigurationSerializable> clazz) { return new ConfigurationSerialization(clazz).deserialize(args); } @@ -162,7 +162,7 @@ public class ConfigurationSerialization { * @param args Arguments for deserialization * @return New instance of the specified class */ - public static ConfigurationSerializable deserializeObject(Map<String, Object> args) { + public static ConfigurationSerializable deserializeObject(Map<String, ?> args) { Class<? extends ConfigurationSerializable> clazz = null; if (args.containsKey(SERIALIZED_TYPE_KEY)) { |