From 5275d4ec62165dc5cbf792b8b0f75a57f7afbf6b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 29 Mar 2016 17:13:19 +1100 Subject: [PATCH] Fix "cleanup" breaking plugin again --- .../configuration/MemorySection.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/configuration/MemorySection.java b/Core/src/main/java/com/intellectualcrafters/configuration/MemorySection.java index 4b69c9787..5e42c95f6 100644 --- a/Core/src/main/java/com/intellectualcrafters/configuration/MemorySection.java +++ b/Core/src/main/java/com/intellectualcrafters/configuration/MemorySection.java @@ -537,12 +537,16 @@ public class MemorySection implements ConfigurationSection { @Override public List getStringList(String path) { - List list = getList(path); + final List list = getList(path); - List result = new ArrayList<>(); + if (list == null) { + return new ArrayList<>(0); + } - for (Object object : list) { - if ((object instanceof String) || isPrimitiveWrapper(object)) { + final List result = new ArrayList<>(); + + for (final Object object : list) { + if ((object instanceof String) || (isPrimitiveWrapper(object))) { result.add(String.valueOf(object)); } }