mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Fix leaked 'MLPropertyInterceptor.setMLAware' in data load API implementation (ACE-4552)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@116895 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -279,6 +279,8 @@ public class FileFolderLoader
|
|||||||
{
|
{
|
||||||
// Add the cm:description additional properties
|
// Add the cm:description additional properties
|
||||||
boolean wasMLAware = MLPropertyInterceptor.setMLAware(true);
|
boolean wasMLAware = MLPropertyInterceptor.setMLAware(true);
|
||||||
|
try
|
||||||
|
{
|
||||||
MLText descriptions = new MLText();
|
MLText descriptions = new MLText();
|
||||||
String[] languages = Locale.getISOLanguages();
|
String[] languages = Locale.getISOLanguages();
|
||||||
String defaultLanguage = Locale.getDefault().getLanguage();
|
String defaultLanguage = Locale.getDefault().getLanguage();
|
||||||
@@ -308,8 +310,12 @@ public class FileFolderLoader
|
|||||||
descriptions.put(languageLocale, description);
|
descriptions.put(languageLocale, description);
|
||||||
}
|
}
|
||||||
nodeService.setProperty(fileNodeRef, ContentModel.PROP_DESCRIPTION, descriptions);
|
nodeService.setProperty(fileNodeRef, ContentModel.PROP_DESCRIPTION, descriptions);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
MLPropertyInterceptor.setMLAware(wasMLAware);
|
MLPropertyInterceptor.setMLAware(wasMLAware);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Success
|
// Success
|
||||||
count.incrementAndGet();
|
count.incrementAndGet();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user