Use static method for new StoreParameters instance

This commit is contained in:
René Pfeuffer
2018-12-03 11:28:03 +01:00
parent ab8b3bae42
commit 3638d3520f
16 changed files with 85 additions and 89 deletions

View File

@@ -73,10 +73,10 @@ public abstract class FileBasedStoreFactory {
protected File getStoreLocation(String name, Class type, Repository repository) {
if (storeDirectory == null) {
if (repository != null) {
LOG.debug("create store with type :{}, name:{} and repository {}", type, name, repository.getNamespaceAndName());
LOG.debug("create store with type: {}, name: {} and repository: {}", type, name, repository.getNamespaceAndName());
storeDirectory = this.getStoreDirectory(store, repository);
} else {
LOG.debug("create store with type :{} and name:{} ", type, name);
LOG.debug("create store with type: {} and name: {} ", type, name);
storeDirectory = this.getStoreDirectory(store);
}
IOUtil.mkdirs(storeDirectory);
@@ -91,7 +91,7 @@ public abstract class FileBasedStoreFactory {
* @return the store directory of a specific repository
*/
private File getStoreDirectory(Store store, Repository repository) {
return new File (repositoryLocationResolver.getPath(repository.getId()).toFile(), store.getRepositoryStoreDirectory());
return new File(repositoryLocationResolver.getPath(repository.getId()).toFile(), store.getRepositoryStoreDirectory());
}
/**