this.sourcesLock.readLock().lock();
RepositoryConnectionPool existingPool = this.pools.get(sourceName);
if (existingPool != null) return existingPool.getConnection();
RepositoryConnectionFactory delegate = this.delegate;
if (delegate != null) {
return delegate.createConnection(sourceName);
}
} finally {
this.sourcesLock.readLock().unlock();
}
return null;