Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

75505: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (5.0/Cloud)
      74929: MNT-11772: Cast Exception When Mapping Single Metadata Property to cm:taggable
         - Added check of propertyValue type


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77467 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-22 12:40:31 +00:00
parent ee9d5fddcf
commit e208531988

View File

@@ -1581,9 +1581,16 @@ abstract public class AbstractMappingMetadataExtracter implements MetadataExtrac
// We must want to map tag string values instead of nodeRefs
// ContentMetadataExtracter will take care of tagging by string
ArrayList<Object> list = new ArrayList<Object>(1);
for (Object value : (Object[]) propertyValue)
if (propertyValue instanceof Object[])
{
list.add(value);
for (Object value : (Object[]) propertyValue)
{
list.add(value);
}
}
else
{
list.add(propertyValue);
}
convertedProperties.put(propertyQName, list);
}