summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-11-24 16:05:41 +0000
committerElgarL <ElgarL@palmergames.com>2011-11-24 16:05:41 +0000
commit5a9b573309fc36073660220c48fdfa172734e9c4 (patch)
treec088dd8fa43bdc869a20dee7b67697f6f6192563
parent70c235d4f074f24ce83240cd3033aa6ffcbfa61f (diff)
downloadEssentials-5a9b573309fc36073660220c48fdfa172734e9c4.tar
Essentials-5a9b573309fc36073660220c48fdfa172734e9c4.tar.gz
Essentials-5a9b573309fc36073660220c48fdfa172734e9c4.tar.lz
Essentials-5a9b573309fc36073660220c48fdfa172734e9c4.tar.xz
Essentials-5a9b573309fc36073660220c48fdfa172734e9c4.zip
More optimization (charAt(0))
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
index 2b48eafa0..b20780a54 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
@@ -601,9 +601,9 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
for (String access : user.getPermissionList()) {
if (comparePermissionString(access, permission)) {
result.accessLevel = access;
- if (access.startsWith("-")) {
+ if (access.charAt(0) == '-') {
result.resultType = PermissionCheckResult.Type.NEGATION;
- } else if (access.startsWith("+")) {
+ } else if (access.charAt(0) == '+') {
result.resultType = PermissionCheckResult.Type.EXCEPTION;
} else {
result.resultType = PermissionCheckResult.Type.FOUND;
@@ -631,9 +631,9 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
for (String access : group.getPermissionList()) {
if (comparePermissionString(access, permission)) {
result.accessLevel = access;
- if (access.startsWith("-")) {
+ if (access.charAt(0) == '-') {
result.resultType = PermissionCheckResult.Type.NEGATION;
- } else if (access.startsWith("+")) {
+ } else if (access.charAt(0) == '+') {
result.resultType = PermissionCheckResult.Type.EXCEPTION;
} else {
result.resultType = PermissionCheckResult.Type.FOUND;