]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-565: Fixed authority-with-contact term startup initialization.
authorRichard Millet <remillet@gmail.com>
Mon, 14 Jan 2019 21:59:23 +0000 (13:59 -0800)
committerRichard Millet <remillet@gmail.com>
Mon, 14 Jan 2019 21:59:23 +0000 (13:59 -0800)
services/common/src/main/java/org/collectionspace/services/common/UriInfoWrapper.java
services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java

index 798abe3fae7787e5fe4385d6ae6eb8304d06a0d9..1b9af536e69766d2f625d79ea343df8364973c5c 100644 (file)
@@ -71,7 +71,10 @@ public class UriInfoWrapper implements UriInfo {
 
        @Override
        public String getPath() {
-               return uriInfo.getPath();
+               if (uriInfo != null)
+                       return uriInfo.getPath();
+               else
+                       return null;
        }
 
        @Override
index eb12ee287ba83fbe5a6fe2102505a331a1673d18..93d22b8dd3d2fc0809318a1702807a760b28a185 100644 (file)
@@ -193,7 +193,7 @@ public class ContactDocumentModelHandler
     public String getUri(DocumentModel docModel) {
         String uri = "";
         UriInfo ui = getServiceContext().getUriInfo();
-        if (ui != null) {
+        if (ui != null && ui.getPath() != null) {
             uri = '/' + getAuthorityPathComponent(ui) + '/' + inAuthority
                     + '/' + AuthorityClient.ITEMS + '/' + inItem
                     + getServiceContextPath() + getCsid(docModel);