Modify setFrozen behavior (#395)

This commit is contained in:
nlog 2023-02-26 05:59:04 +09:00 committed by GitHub
parent 631c409f79
commit b9a3c2849a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -109,8 +109,13 @@ public class BlueMapMapImpl implements BlueMapMap {
@Override
public synchronized void setFrozen(boolean frozen) {
if (isFrozen()) unfreeze();
else freeze();
if (frozen != isFrozen()) {
if (frozen) {
freeze();
} else {
unfreeze();
}
}
}
private synchronized void unfreeze() {