Actions
Defect #1673
closedProvisioning break removing from cache throw null pointer
Start date:
05/21/2019
Due date:
% Done:
100%
Estimated time:
Affected versions:
Owner:
Description
During removing expired items form provisioning break cache may throw exception will null pointer:
java.lang.NullPointerException: null at java.util.LinkedList$ListItr.next(LinkedList.java:893) at java.util.Collection.removeIf(Collection.java:414) at eu.bcvsolutions.idm.acc.dto.SysProvisioningBreakItems.removeOlderRecordsThan(SysProvisioningBreakItems.java:72)
This null pointer is throw in method next
Next method implementation
public E next() { checkForComodification(); if (!hasNext()) throw new NoSuchElementException(); lastReturned = next; next = next.next; nextIndex++; return lastReturned.item; }
Problem is only when two thread entry this method and both execute check hasNext() before one of them entry into line with next = next.next; This issues is very hard to simulate. And probably only way is add synchronized list or synchronized block to processor that call this cache.
Affected version: all version where exists provisioning break.
Files
Actions