mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-1105: Adding the RM module causes exceptions when listing the existing audit applications through the audit webscript - Added a try/catch for a ClassCastException around the check to see if the returned object contained a PROP_HOLD_REASON in the RMAfterInvocationProvider. The reason for this is that the containsKeys method will throw a class cast exception if we attempt to see if the keys contain an instance of QName if the returnedObject instance is a TreeMap containing strings as is the case when listing the audit applications through the RESTful interface.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.1@59361 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -951,6 +951,7 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
|
||||
@SuppressWarnings({"unchecked", "rawtypes" })
|
||||
private Map decide(Authentication authentication, Object object, ConfigAttributeDefinition config, Map returnedObject) throws AccessDeniedException
|
||||
{
|
||||
try {
|
||||
if (returnedObject.containsKey(RecordsManagementModel.PROP_HOLD_REASON))
|
||||
{
|
||||
HashMap filtered = new HashMap();
|
||||
@@ -972,6 +973,12 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
|
||||
return returnedObject;
|
||||
}
|
||||
}
|
||||
catch(ClassCastException ex)
|
||||
{
|
||||
// This will happen if returnedObject is an instance of TreeMap containing anything other than instances of QName
|
||||
return returnedObject;
|
||||
}
|
||||
}
|
||||
|
||||
private class ConfigAttributeDefintion
|
||||
{
|
||||
|
Reference in New Issue
Block a user