mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-29 05:55:57 +01:00
Fix syncronization issue with the marker-api
This commit is contained in:
parent
c31945444d
commit
470a5cbad1
@ -92,6 +92,7 @@ public synchronized void load() throws IOException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void load(boolean overwriteChanges) throws IOException {
|
private synchronized void load(boolean overwriteChanges) throws IOException {
|
||||||
|
synchronized (MarkerAPIImpl.class) {
|
||||||
Set<String> externallyRemovedSets = new HashSet<>(markerSets.keySet());
|
Set<String> externallyRemovedSets = new HashSet<>(markerSets.keySet());
|
||||||
|
|
||||||
if (markerFile.exists() && markerFile.isFile()) {
|
if (markerFile.exists() && markerFile.isFile()) {
|
||||||
@ -132,9 +133,11 @@ private synchronized void load(boolean overwriteChanges) throws IOException {
|
|||||||
removedMarkerSets.clear();
|
removedMarkerSets.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void save() throws IOException {
|
public synchronized void save() throws IOException {
|
||||||
|
synchronized (MarkerAPIImpl.class) {
|
||||||
load(false);
|
load(false);
|
||||||
|
|
||||||
FileUtils.createFile(markerFile);
|
FileUtils.createFile(markerFile);
|
||||||
@ -150,5 +153,6 @@ public synchronized void save() throws IOException {
|
|||||||
|
|
||||||
removedMarkerSets.clear();
|
removedMarkerSets.clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user