From 20b9111495d6df863e8e3eab0a805a91d8537725 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 1 Feb 2013 02:52:41 +0000 Subject: [GM] Catch all of the null. --- .../groupmanager/dataholder/WorldDataHolder.java | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 04efd384e..095b99a50 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -823,24 +823,28 @@ public class WorldDataHolder { * nothing. */ } else { - if (nodeData instanceof List) { - for (Object o : ((List) nodeData)) { - /* - * Only add this permission if it's not empty - */ - if (!o.toString().isEmpty()) - thisUser.addPermission(o.toString()); - } - } else if (nodeData instanceof String) { - try { + try { + if (nodeData instanceof List) { + for (Object o : ((List) nodeData)) { + /* + * Only add this permission if it's not empty + */ + if (!o.toString().isEmpty()) { + thisUser.addPermission(o.toString()); + } + } + } else if (nodeData instanceof String) { + /* * Only add this permission if it's not empty */ - if (!nodeData.toString().isEmpty()) + if (!nodeData.toString().isEmpty()) { thisUser.addPermission(nodeData.toString()); - } catch (NullPointerException e) { - // Ignore this entry as it's null. + } + } + } catch (NullPointerException e) { + // Ignore this entry as it's null. } thisUser.sortPermissions(); } -- cgit v1.2.3