Remove special RepositoryNotFoundException

This commit is contained in:
René Pfeuffer
2018-10-18 16:08:49 +02:00
parent b74fb814b8
commit bf1effb9c0
21 changed files with 56 additions and 134 deletions

View File

@@ -198,7 +198,7 @@ public class DefaultRepositoryManager extends AbstractRepositoryManager {
}
@Override
public void refresh(Repository repository) throws RepositoryNotFoundException {
public void refresh(Repository repository) {
AssertUtil.assertIsNotNull(repository);
RepositoryPermissions.read(repository).check();
@@ -207,7 +207,7 @@ public class DefaultRepositoryManager extends AbstractRepositoryManager {
if (fresh != null) {
fresh.copyProperties(repository);
} else {
throw new RepositoryNotFoundException(repository);
throw NotFoundException.notFound(repository).build();
}
}

View File

@@ -61,7 +61,7 @@ public final class HealthChecker {
Repository repository = repositoryManager.get(id);
if (repository == null) {
throw new RepositoryNotFoundException(id);
throw new NotFoundException(Repository.class, id);
}
doCheck(repository);