From d94bb9bd5b09f2babc63fe674ef8d3fa77964dcb Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Fri, 10 Feb 2017 11:55:49 +0000 Subject: [PATCH] REPO-1986: Upload Failing due to Metadata Extraction Issue (MNT-17436) - trivial - fix when debug logging (if rawValue is null - nothing to do) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@135078 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/action/executer/ContentMetadataExtracter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/action/executer/ContentMetadataExtracter.java b/source/java/org/alfresco/repo/action/executer/ContentMetadataExtracter.java index 48d7fddec7..1752fc9775 100644 --- a/source/java/org/alfresco/repo/action/executer/ContentMetadataExtracter.java +++ b/source/java/org/alfresco/repo/action/executer/ContentMetadataExtracter.java @@ -197,11 +197,16 @@ public class ContentMetadataExtracter extends ActionExecuterAbstractBase */ protected void addTags(NodeRef actionedUponNodeRef, PropertyDefinition propertyDef, Serializable rawValue) { + if (rawValue == null) + { + return; + } + List tags = new ArrayList(); if (logger.isDebugEnabled()) { - logger.debug("converting " + rawValue.toString() + " of type " + rawValue.getClass().getCanonicalName() + " to tags"); + logger.debug("converting " + rawValue + " of type " + rawValue.getClass().getCanonicalName() + " to tags"); } if (rawValue instanceof Collection) @@ -274,7 +279,7 @@ public class ContentMetadataExtracter extends ActionExecuterAbstractBase if (logger.isDebugEnabled()) { - logger.debug("adding tags '" + tags + "' to " + actionedUponNodeRef.toString()); + logger.debug("adding tags '" + tags + "' to " + actionedUponNodeRef); } try