Fix synchronization - leftover from refactoring

This commit is contained in:
Simon Willnauer 2014-11-16 15:58:10 +01:00
parent 1c64a113de
commit 176b4eb1ed

View File

@ -270,7 +270,7 @@ public class NodeEnvironment extends AbstractComponent implements Closeable{
* Returns all currently lock shards * Returns all currently lock shards
*/ */
public Set<ShardId> lockedShards() { public Set<ShardId> lockedShards() {
synchronized (this) { synchronized (shardLocks) {
ImmutableSet.Builder<ShardId> builder = ImmutableSet.builder(); ImmutableSet.Builder<ShardId> builder = ImmutableSet.builder();
return builder.addAll(shardLocks.keySet()).build(); return builder.addAll(shardLocks.keySet()).build();
} }