mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-04 01:49:31 +01:00
Don't intern strings in permission checking process
This commit is contained in:
parent
2aabc9902f
commit
c8bb85a06b
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user