diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-02-01 02:52:41 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-02-01 02:52:41 +0000 |
commit | 20b9111495d6df863e8e3eab0a805a91d8537725 (patch) | |
tree | ef369432e9266c6a4885e77075194a1291aa9c58 /EssentialsGroupManager/src/org | |
parent | 1661eddc0208db7e990ad07118970fae649ec937 (diff) | |
download | Essentials-20b9111495d6df863e8e3eab0a805a91d8537725.tar Essentials-20b9111495d6df863e8e3eab0a805a91d8537725.tar.gz Essentials-20b9111495d6df863e8e3eab0a805a91d8537725.tar.lz Essentials-20b9111495d6df863e8e3eab0a805a91d8537725.tar.xz Essentials-20b9111495d6df863e8e3eab0a805a91d8537725.zip |
[GM] Catch all of the null.
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 30 |
1 files changed, 17 insertions, 13 deletions
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(); } |