mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-2049 - ClassCast exception during import
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19790 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -50,6 +50,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.XPathException;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.cmr.repository.datatype.TypeConverter;
|
||||
import org.alfresco.service.cmr.rule.RuleService;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.AccessPermission;
|
||||
@@ -807,7 +808,16 @@ public class ImporterComponent
|
||||
else
|
||||
{
|
||||
Map<QName, Serializable> typeProperties = context.getProperties();
|
||||
String name = (String)typeProperties.get(ContentModel.PROP_NAME);
|
||||
|
||||
Serializable nameValue = typeProperties.get(ContentModel.PROP_NAME);
|
||||
|
||||
if(nameValue != null && !String.class.isAssignableFrom(nameValue.getClass()))
|
||||
{
|
||||
throw new ImporterException("Unable to use childName property: "+ ContentModel.PROP_NAME + " is not a string");
|
||||
}
|
||||
|
||||
String name = (String)nameValue;
|
||||
|
||||
if (name != null && name.length() > 0)
|
||||
{
|
||||
name = bindPlaceHolder(name, binding);
|
||||
|
Reference in New Issue
Block a user