ALF-19234 "An Editor (probably also Collaborator) can take ownership of a document (probably also folders)" fix NPE in acl code

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55195 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2013-09-10 15:50:26 +00:00
parent d86666e0ea
commit a9ea9897c4

View File

@@ -477,7 +477,8 @@ public class ACLEntryVoter implements AccessDecisionVoter, InitializingBean
else if (QName.class.isAssignableFrom(params[1]) && params[2] != null) else if (QName.class.isAssignableFrom(params[1]) && params[2] != null)
{ {
testNodeRef = getArgument(invocation, cad.parameter[0]); testNodeRef = getArgument(invocation, cad.parameter[0]);
boolean isChanged = !getArgument(invocation, 2).toString().equals(ownableService.getOwner(testNodeRef)); Object arg2 = getArgument(invocation, 2);
boolean isChanged = (arg2 != null && !arg2.toString().equals(ownableService.getOwner(testNodeRef)));
if (!isChanged) if (!isChanged)
{ {