Ensure getLocations() is synchronized (just like findOne())

Concurrent access can be an issue with file locks in JGit (e.g.
see gh-261, which no-one reproduced, but smells like it's related).
This commit is contained in:
Dave Syer
2015-12-21 10:51:46 +00:00
parent 1c1ca02aad
commit c97a8f5144
2 changed files with 2 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ public class JGitEnvironmentRepository extends AbstractScmEnvironmentRepository
}
@Override
public Locations getLocations(String application, String profile, String label) {
public synchronized Locations getLocations(String application, String profile, String label) {
if (label==null) {
label = this.defaultLabel;
}

View File

@@ -59,7 +59,7 @@ public class SvnKitEnvironmentRepository extends AbstractScmEnvironmentRepositor
}
@Override
public Locations getLocations(String application, String profile, String label) {
public synchronized Locations getLocations(String application, String profile, String label) {
if (label==null) {
label = this.defaultLabel;
}