From cd8ef9361bd103f380ec6d5fa11063a3ba7556e7 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Thu, 24 Nov 2011 16:45:57 +0000 Subject: minimal optimizations --- .../anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java index b20780a54..9387f13ac 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java @@ -967,15 +967,13 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { public boolean comparePermissionString(String userAccessLevel, String fullPermissionName) { int userAccessLevelLength; if (userAccessLevel == null || fullPermissionName == null - || (userAccessLevelLength = userAccessLevel.length()) == 0 || fullPermissionName.length() == 0) { + || fullPermissionName.length() == 0 || (userAccessLevelLength = userAccessLevel.length()) == 0) { return false; } - int userAccessLevelOffset; + int userAccessLevelOffset = 0; if (userAccessLevel.charAt(0) == '+' || userAccessLevel.charAt(0) == '-') { userAccessLevelOffset = 1; - } else { - userAccessLevelOffset = 0; } if ("*".regionMatches(0, userAccessLevel, userAccessLevelOffset, userAccessLevelLength - userAccessLevelOffset)) { return true; -- cgit v1.2.3