Don't intern strings in permission checking process

This commit is contained in:
Luck 2018-03-31 22:13:10 +01:00
parent 2aabc9902f
commit c8bb85a06b
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -83,7 +83,7 @@ public class PermissionCalculator implements CacheLoader<String, Tristate> {
public Tristate getPermissionValue(String permission, CheckOrigin origin) { public Tristate getPermissionValue(String permission, CheckOrigin origin) {
// convert the permission to lowercase, as all values in the backing map are also lowercase. // convert the permission to lowercase, as all values in the backing map are also lowercase.
// this allows fast case insensitive lookups // this allows fast case insensitive lookups
permission = permission.toLowerCase().intern(); permission = permission.toLowerCase();
// get the result // get the result
Tristate result = this.lookupCache.get(permission); Tristate result = this.lookupCache.get(permission);