mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-24 01:09:48 +01:00
Fix path computation and resolving
This commit is contained in:
@@ -173,6 +173,6 @@ public abstract class AbstractSimpleRepositoryHandler<C extends RepositoryConfig
|
||||
}
|
||||
|
||||
private File resolveNativeDirectory(String repositoryId) {
|
||||
return repositoryLocationResolver.forClass(Path.class).getLocation(repositoryId).resolve(REPOSITORIES_NATIVE_DIRECTORY).toFile();
|
||||
return repositoryLocationResolver.create(Path.class).getLocation(repositoryId).resolve(REPOSITORIES_NATIVE_DIRECTORY).toFile();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ public abstract class RepositoryLocationResolver {
|
||||
|
||||
protected abstract <T> RepositoryLocationResolverInstance<T> create(Class<T> type);
|
||||
|
||||
// TODO make final, but fix mockito mocking
|
||||
public <T> RepositoryLocationResolverInstance<T> forClass(Class<T> type) {
|
||||
public final <T> RepositoryLocationResolverInstance<T> forClass(Class<T> type) {
|
||||
if (!supportsLocationType(type)) {
|
||||
throw new IllegalStateException("no support for location of class " + type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user