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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user