AnsweredAssumed Answered

NPE while deleting task candidates

Question asked by cnayak on Sep 8, 2014
Latest reply on Sep 8, 2014 by cnayak
I am getting a NPE while deleting candidate group when a task has both user and group candidates and is assigned to a user.

Debugging this further, I see that it is failing in the code block below while iterating through identity links when groupId passed in to TaskEntity.deleteIdentityLink method is not null but one of the identity links associated with the task is a user type.

if ((userId != null && userId.equals(identityLinkEntity.getUserId()))
|| (groupId != null && identityLinkEntity.getGroupId().equals(groupId))) {
.deleteIdentityLink(identityLinkEntity, true);

It is failing on (groupId != null && identityLinkEntity.getGroupId().equals(groupId)) when groupId is passed in but identityLinkEntity being checked is a user so identityLinkEntity.getGroupId() is null. Should this be groupId.equals(identityLinkEntity.getGroupId()) instead ?

Seems like a bug, has this been reported or fixed in a later release - I am using 5.15.