NIHVIVO-1835 Guard against a File Bytestream individual whose AliasURL is the same as its URI.
This commit is contained in:
parent
8c016eaf39
commit
5db1494e85
2 changed files with 16 additions and 2 deletions
|
@ -505,8 +505,15 @@ public class EntityController extends VitroHttpServlet {
|
|||
|
||||
String url = fileInfo.getBytestreamAliasUrl();
|
||||
log.debug("Alias URL for '" + entity.getURI() + "' is '" + url + "'");
|
||||
|
||||
if (entity.getURI().equals(url)) {
|
||||
// Avoid a tight loop; if the alias URL is equal to the URI, then
|
||||
// don't recognize it as a File Bytestream.
|
||||
return null;
|
||||
} else {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
private Model getRDF(Individual entity, OntModel contextModel, Model newModel, int recurseDepth ) {
|
||||
Resource subj = newModel.getResource(entity.getURI());
|
||||
|
|
|
@ -536,8 +536,15 @@ public class IndividualController extends FreemarkerHttpServlet {
|
|||
|
||||
String url = fileInfo.getBytestreamAliasUrl();
|
||||
log.debug("Alias URL for '" + entity.getURI() + "' is '" + url + "'");
|
||||
|
||||
if (entity.getURI().equals(url)) {
|
||||
// Avoid a tight loop; if the alias URL is equal to the URI, then
|
||||
// don't recognize it as a File Bytestream.
|
||||
return null;
|
||||
} else {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
private Model getRDF(Individual entity, OntModel contextModel, Model newModel, int recurseDepth ) {
|
||||
Resource subj = newModel.getResource(entity.getURI());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue