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

@@ -35,10 +35,10 @@ package sonia.scm.web.lfs;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import sonia.scm.repository.Repository;
import sonia.scm.store.Blob;
import sonia.scm.store.BlobStore;
import sonia.scm.store.BlobStoreFactory;
import sonia.scm.store.StoreParameters;
import static sonia.scm.store.StoreParameters.forType;
/**
* Creates {@link BlobStore} objects to store lfs objects.
@@ -78,11 +78,11 @@ public class LfsBlobStoreFactory {
*/
@SuppressWarnings("unchecked")
public BlobStore getLfsBlobStore(Repository repository) {
return blobStoreFactory.getStore(new StoreParameters()
.withType(Blob.class)
.withName(repository.getId() + GIT_LFS_REPOSITORY_POSTFIX)
.forRepository(repository)
.build()
return blobStoreFactory.getStore(
forType(String.class)
.withName(repository.getId() + GIT_LFS_REPOSITORY_POSTFIX)
.forRepository(repository)
.build()
);
}
}