Merged 5.0.N (5.0.4) to 5.1.N (5.1.1)

123356 cturlica: Merged V4.2-BUG-FIX (4.2.7) to 5.0.N (5.0.4)
      123206 adavis: Merged V4.2.6 (4.2.6) to V4.2-BUG-FIX (4.2.7)
         123099 amorarasu: MNT-15798: CLONE - call to guessMimetype() on a node that has no content creates a content property
               Reverse merged V4.2.6 (4.2.6)
                  104274 mbobyleu: Merged DEV (4.2.5) to V4.2-BUG-FIX (4.2.5)
                     102794: MNT-8678 : call to guessMimetype() on a node that has no content creates a content property
                        - add check for empty content before saving a node


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@123433 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-03-10 13:14:11 +00:00
parent 80aa1b0ba3
commit 57562b2557

View File

@@ -1725,22 +1725,11 @@ public class ScriptNode implements Scopeable, NamespacePrefixResolverProvider
for (String key : this.properties.keySet())
{
Serializable value = (Serializable) this.properties.get(key);
QName qname= createQName(key);
// MNT-8678
if (ContentModel.PROP_CONTENT.equals(qname) && (value instanceof ScriptContentData))
{
ScriptContentData contentData = (ScriptContentData) value;
if (contentData.getSize() == 0)
{
continue;
}
}
// perform the conversion from script wrapper object to repo serializable values
value = getValueConverter().convertValueForRepo(value);
props.put(qname, value);
props.put(createQName(key), value);
}
this.nodeService.setProperties(this.nodeRef, props);
}