mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-02-26 05:51:12 +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
|
@Nullable
|
||||||
public PlaceholderExpansion getExpansion(@NotNull final String identifier) {
|
public PlaceholderExpansion getExpansion(@NotNull final String identifier) {
|
||||||
expansionsLock.lock();
|
|
||||||
try {
|
|
||||||
return expansions.get(identifier.toLowerCase(Locale.ROOT));
|
return expansions.get(identifier.toLowerCase(Locale.ROOT));
|
||||||
} finally {
|
|
||||||
expansionsLock.unlock();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user