mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD
44080: Hardening of QNameFieldProcessor against fields specified with residual or missing namespaces (re ALF-16696) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44081 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,6 +28,7 @@ import org.alfresco.repo.forms.processor.FieldProcessor;
|
||||
import org.alfresco.repo.forms.processor.FormCreationData;
|
||||
import org.alfresco.service.cmr.dictionary.ClassAttributeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.namespace.NamespaceException;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
@@ -60,10 +61,18 @@ public abstract class QNameFieldProcessor<Type extends ClassAttributeDefinition>
|
||||
*/
|
||||
@Override
|
||||
protected Field generateTypedField(String fieldName, FormCreationData formData, ContentModelItemData<?> typedData)
|
||||
{
|
||||
Field field = null;
|
||||
try
|
||||
{
|
||||
QName fullName = getFullName(fieldName);
|
||||
boolean isForcedField = formData.isForcedField(fieldName);
|
||||
Field field = generateField(fullName, typedData, isForcedField);
|
||||
field = generateField(fullName, typedData, isForcedField);
|
||||
}
|
||||
catch (NamespaceException ne)
|
||||
{
|
||||
// ignore fields with an invalid namespace - the model may no longer be present in the repository
|
||||
}
|
||||
return field;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user