Skip to content

Commit

Permalink
[DURACOM-272] fix NPE for Notify
Browse files Browse the repository at this point in the history
  • Loading branch information
steph-ieffam committed Jun 12, 2024
1 parent 18c2f74 commit a2de434
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,17 @@ public void update(Context context, LDNMessageEntity ldnMessage) throws SQLExcep
private DSpaceObject findDspaceObjectByUrl(Context context, String url) throws SQLException {
String dspaceUrl = configurationService.getProperty("dspace.ui.url") + "/handle/";

if (url.startsWith(dspaceUrl)) {
if (StringUtils.startsWith(url, dspaceUrl)) {
return handleService.resolveToObject(context, url.substring(dspaceUrl.length()));
}

String handleResolver = configurationService.getProperty("handle.canonical.prefix", "https://hdl.handle.net/");
if (url.startsWith(handleResolver)) {
if (StringUtils.startsWith(url, handleResolver)) {
return handleService.resolveToObject(context, url.substring(handleResolver.length()));
}

dspaceUrl = configurationService.getProperty("dspace.ui.url") + "/items/";
if (url.startsWith(dspaceUrl)) {
if (StringUtils.startsWith(url, dspaceUrl)) {
return itemService.find(context, UUID.fromString(url.substring(dspaceUrl.length())));
}

Expand Down

0 comments on commit a2de434

Please sign in to comment.