]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6375: Added code to prevent NPE when Nuxeo finds a null value for a field...
authorremillet <remillet@yahoo.com>
Tue, 31 Mar 2015 18:12:06 +0000 (11:12 -0700)
committerremillet <remillet@yahoo.com>
Tue, 31 Mar 2015 18:12:06 +0000 (11:12 -0700)
services/blob/service/src/main/java/org/collectionspace/services/blob/nuxeo/BlobDocumentModelHandler.java
services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java

index cb6c26659149e1dfedd6f4688894bc5577d4be31..679dce1b8d5814e67cfd03e5e9b653a8ca5c4cd0 100644 (file)
@@ -202,8 +202,8 @@ extends NuxeoDocumentModelHandler<BlobsCommon> {
                super.extractAllParts(wrapDoc);
        }
 
-       @Override
-       public void fillAllParts(DocumentWrapper<DocumentModel> wrapDoc, Action action) throws Exception {
+       @Deprecated
+       public void xfillAllParts(DocumentWrapper<DocumentModel> wrapDoc, Action action) throws Exception {
                ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = this.getServiceContext();
                BlobInput blobInput = BlobUtil.getBlobInput(ctx); // The blobInput should have been put into the context by the Blob or Media resource
                if (blobInput != null && blobInput.getBlobFile() != null) {             
index 1ef9a9dd91d2886c8b58c30b3992043ed99fe78e..2b4cf2aa07c8d703126a2153781805ab117485f1 100644 (file)
@@ -788,6 +788,9 @@ public class NuxeoUtils {
                                throw new IndexOutOfBoundsException("Problem retrieving property {" + xpath
                                                + "}:" + ioobe.getLocalizedMessage());
                        }
+               } catch (NullPointerException npe) {
+                       logger.error(String.format("Null value found for property %s for document with ID %s",
+                                       xpath, docModel.getId()), npe);
                }
 
                return result;