summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorsleak <sleak@sleak-PC>2011-12-16 09:27:54 -0800
committerNathan Adams <dinnerbone@dinnerbone.com>2011-12-19 16:13:07 +0000
commit189768185ca34cafa313d927e19039e2ea1d84b1 (patch)
tree2294743476d2f041cd6c4212dd8509dca2f09494 /src/main/java/org
parent28372908d7bc6716e19472a25024071a0705a129 (diff)
downloadbukkit-189768185ca34cafa313d927e19039e2ea1d84b1.tar
bukkit-189768185ca34cafa313d927e19039e2ea1d84b1.tar.gz
bukkit-189768185ca34cafa313d927e19039e2ea1d84b1.tar.lz
bukkit-189768185ca34cafa313d927e19039e2ea1d84b1.tar.xz
bukkit-189768185ca34cafa313d927e19039e2ea1d84b1.zip
Fix for BUKKIT-313 - this makes getString return a string representation of whatever object is present at the path, rather than only returning if the object is a string
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/configuration/MemorySection.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/configuration/MemorySection.java b/src/main/java/org/bukkit/configuration/MemorySection.java
index 99c3e819..3cae2295 100644
--- a/src/main/java/org/bukkit/configuration/MemorySection.java
+++ b/src/main/java/org/bukkit/configuration/MemorySection.java
@@ -289,7 +289,7 @@ public class MemorySection implements ConfigurationSection {
}
Object def = getDefault(path);
- return getString(path, (def instanceof String) ? (String)def : null);
+ return getString(path, def != null ? def.toString() : null);
}
public String getString(String path, String def) {
@@ -298,7 +298,7 @@ public class MemorySection implements ConfigurationSection {
}
Object val = get(path, def);
- return (val instanceof String) ? (String)val : def;
+ return (val != null) ? val.toString() : def;
}
public boolean isString(String path) {