mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
Fail for missing revision
This commit is contained in:
@@ -41,7 +41,7 @@ public class BrowserResultToBrowserResultDtoMapper {
|
|||||||
path = "";
|
path = "";
|
||||||
}
|
}
|
||||||
if (browserResult.getRevision() == null) {
|
if (browserResult.getRevision() == null) {
|
||||||
dto.add(Links.linkingTo().self(resourceLinks.source().selfWithoutRevision(namespaceAndName.getNamespace(), namespaceAndName.getName())).build());
|
throw new IllegalStateException("missing revision in browser result for repository " + namespaceAndName + " and path " + path);
|
||||||
} else {
|
} else {
|
||||||
dto.add(Links.linkingTo().self(resourceLinks.source().sourceWithPath(namespaceAndName.getNamespace(), namespaceAndName.getName(), browserResult.getRevision(), path)).build());
|
dto.add(Links.linkingTo().self(resourceLinks.source().sourceWithPath(namespaceAndName.getNamespace(), namespaceAndName.getName(), browserResult.getRevision(), path)).build());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user