Issue #1110 synchronize sat resource init and remove to avoid concurrent modification.

Former-commit-id: e3bb8c80c9 [formerly 1f587e39f4] [formerly e3bb8c80c9 [formerly 1f587e39f4] [formerly 37d2411b26 [formerly e3c5526f9b12ae38c12094e7ebf9f9d6823f3257]]]
Former-commit-id: 37d2411b26
Former-commit-id: 68235d0744 [formerly 36dd387007]
Former-commit-id: b17f2973ca
This commit is contained in:
Ben Steffensmeier 2012-08-29 14:24:21 -05:00
parent 1b9d645810
commit 9c74b28080

View file

@ -514,15 +514,16 @@ public class SatResource extends
@Override
public void remove(DataTime dataTime) {
if (!this.dataTimes.contains(dataTime))
return;
synchronized (this) {
if (!this.dataTimes.contains(dataTime))
return;
this.dataTimes.remove(dataTime);
FileBasedTileSet tile = tileSet.remove(dataTime);
if (tile != baseTile && tile != null)
tile.dispose();
this.dataTimes.remove(dataTime);
FileBasedTileSet tile = tileSet.remove(dataTime);
if (tile != baseTile && tile != null)
tile.dispose();
}
}
@Override