diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-04-18 22:22:35 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-04-18 22:22:35 +0100 |
commit | cd7bf5eff2a1daeb9ad792820265c70ff8b3e0dc (patch) | |
tree | ba755abade6cd010eb09ff82cee5ef90b9fff13e /EssentialsGroupManager | |
parent | 6ac8abdac85e85b30aac1e94b4326cc52c41bf39 (diff) | |
download | Essentials-cd7bf5eff2a1daeb9ad792820265c70ff8b3e0dc.tar Essentials-cd7bf5eff2a1daeb9ad792820265c70ff8b3e0dc.tar.gz Essentials-cd7bf5eff2a1daeb9ad792820265c70ff8b3e0dc.tar.lz Essentials-cd7bf5eff2a1daeb9ad792820265c70ff8b3e0dc.tar.xz Essentials-cd7bf5eff2a1daeb9ad792820265c70ff8b3e0dc.zip |
Prevent null perms getting past the GlobalGroups loader.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index fcdc1ed9d..e321c7741 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -180,4 +180,5 @@ v 2.0: - Update all code formatting to use tabs for indentation.
- Stop using our own deprecated methods as we tell others to do.
- Finally remove all deprecated methods.
- - Re-initialize the WorldsHolder on a reload, as un-registering and re-registering a new holder means all plugins have to check for the new service on every quiery.
\ No newline at end of file + - Re-initialize the WorldsHolder on a reload, as un-registering and re-registering a new holder means all plugins have to check for the new service on every quiery.
+ - Prevent null perms getting past the GlobalGroups loader.
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java index 647d729e5..04d9e86be 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java @@ -159,12 +159,14 @@ public class GlobalGroups { if (element instanceof List) {
try {
for (String node : (List<String>) element) {
- newGroup.addPermission(node);
+ if ((node != null) && !node.isEmpty())
+ newGroup.addPermission(node);
}
} catch (ClassCastException ex) {
throw new IllegalArgumentException("Invalid permission node for global group: " + groupName, ex);
}
} else if (element instanceof String) {
+ if ((element != null) && !((String)element).isEmpty())
newGroup.addPermission((String) element);
} else
throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);
|