mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-02-25 17:41:13 +01:00
Simplify getExpansion method by removing unnecessary locking
This commit is contained in:
@@ -136,12 +136,7 @@ public final class LocalExpansionManager implements Listener {
|
||||
|
||||
@Nullable
|
||||
public PlaceholderExpansion getExpansion(@NotNull final String identifier) {
|
||||
expansionsLock.lock();
|
||||
try {
|
||||
return expansions.get(identifier.toLowerCase(Locale.ROOT));
|
||||
} finally {
|
||||
expansionsLock.unlock();
|
||||
}
|
||||
return expansions.get(identifier.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user