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 | 7b475e6ac79df3797013bbcd8c5fa6292292603d (patch) | |
tree | b6b8c010b4d424cf4d136aedd18f2983f2c3110c | |
parent | 9c09771845bdbff20433548a6203937b6a232aea (diff) | |
download | Essentials-7b475e6ac79df3797013bbcd8c5fa6292292603d.tar Essentials-7b475e6ac79df3797013bbcd8c5fa6292292603d.tar.gz Essentials-7b475e6ac79df3797013bbcd8c5fa6292292603d.tar.lz Essentials-7b475e6ac79df3797013bbcd8c5fa6292292603d.tar.xz Essentials-7b475e6ac79df3797013bbcd8c5fa6292292603d.zip |
[GM] Catch all of the null.
-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(); } |