Navigating through series in the series details modal causes failing attempts to save ACLs

Steps to reproduce

Same as MH-12610, but for series. Or maybe even worse since the ACLs of events in that series will be updated as well.

Steps to reproduce:
1. Create two series s1 and s2 with some ACL rules
2. Open the series detail of s1
3. Navigate to s2 by clicking the > button
4. After reloading the page, no ACLs are displayed as the request to admin-ng/series/<id>/access.json failed with a 500 and an exception in the admin log (NPE).

The problem here also related to MH-12715. The ACL update from the Admin UI sets each role to null, which gets accepted by the admin API endpoint. The invalid ACLs are persisted to the database, but fail when the index is to be updated. This bug thus leads to some data corruption.

Actual Results:
A message "The access rules have been saved" appears. On the admin node log, an exception is reported.

Expected Results:
Navigating through series on the series details modal should not cause to save ACLs even if they were not touched

Workaround (if any):
Do not navigate with < and >

Exception seen during ACL update:
2018-03-13 11:02:14,030 | ERROR | (BaseMessageReceiverImpl$MessageWatcher:148) - Problem while getting org.opencastproject.index.service.message.SeriesMessageReceiverImpl message events java.lang.NullPointerException
at org.opencastproject.security.api.AccessControlEntry.equals(AccessControlEntry.java:98)
at java.util.AbstractList.equals(AbstractList.java:523)
at org.opencastproject.util.EqualsUtil.eqObj(EqualsUtil.java:36)
at org.opencastproject.util.EqualsUtil.eqListUnsorted(EqualsUtil.java:63)
at org.opencastproject.security.api.AccessControlUtil.equals(AccessControlUtil.java:283)
at org.opencastproject.index.service.util.AccessInformationUtil$1.apply(AccessInformationUtil.java:267)
at org.opencastproject.index.service.util.AccessInformationUtil$1.apply(AccessInformationUtil.java:264)
at org.opencastproject.util.data.Monadics$5.find(Monadics.java:364)
at org.opencastproject.index.service.util.AccessInformationUtil.matchAcls(AccessInformationUtil.java:264)
at org.opencastproject.index.service.message.SeriesMessageReceiverImpl.execute(SeriesMessageReceiverImpl.java:104)
at org.opencastproject.index.service.message.SeriesMessageReceiverImpl.execute(SeriesMessageReceiverImpl.java:46)
at org.opencastproject.index.service.message.BaseMessageReceiverImpl$1.run(BaseMessageReceiverImpl.java:162)
at org.opencastproject.index.service.message.BaseMessageReceiverImpl$1.run(BaseMessageReceiverImpl.java:158)
at org.opencastproject.util.data.Effect2.apply(Effect2.java:35)
at org.opencastproject.util.data.Effect2.apply(Effect2.java:32)
at org.opencastproject.util.data.functions.Functions$13.apply(Functions.java:214)
at org.opencastproject.util.data.Function$1.apply(Function.java:101)
at org.opencastproject.index.service.message.MessageReceiverLockService.synchronize(MessageReceiverLockService.java:42)
at org.opencastproject.index.service.message.BaseMessageReceiverImpl$MessageWatcher.run(BaseMessageReceiverImpl.java:139)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

2018-03-13 11:02:14,030 | ERROR | (BaseMessageReceiverImpl$MessageWatcher:148) - Problem while getting org.opencastproject.index.service.message.SeriesMessageReceiverImpl message events java.lang.NullPointerException
at org.opencastproject.security.api.AccessControlEntry.equals(AccessControlEntry.java:98)
at java.util.AbstractList.equals(AbstractList.java:523)
at org.opencastproject.util.EqualsUtil.eqObj(EqualsUtil.java:36)
at org.opencastproject.util.EqualsUtil.eqListUnsorted(EqualsUtil.java:63)
at org.opencastproject.security.api.AccessControlUtil.equals(AccessControlUtil.java:283)
at org.opencastproject.index.service.util.AccessInformationUtil$1.apply(AccessInformationUtil.java:267)
at org.opencastproject.index.service.util.AccessInformationUtil$1.apply(AccessInformationUtil.java:264)
at org.opencastproject.util.data.Monadics$5.find(Monadics.java:364)
at org.opencastproject.index.service.util.AccessInformationUtil.matchAcls(AccessInformationUtil.java:264)
at org.opencastproject.index.service.message.SeriesMessageReceiverImpl.execute(SeriesMessageReceiverImpl.java:104)
at org.opencastproject.index.service.message.SeriesMessageReceiverImpl.execute(SeriesMessageReceiverImpl.java:46)
at org.opencastproject.index.service.message.BaseMessageReceiverImpl$1.run(BaseMessageReceiverImpl.java:162)
at org.opencastproject.index.service.message.BaseMessageReceiverImpl$1.run(BaseMessageReceiverImpl.java:158)
at org.opencastproject.util.data.Effect2.apply(Effect2.java:35)
at org.opencastproject.util.data.Effect2.apply(Effect2.java:32)
at org.opencastproject.util.data.functions.Functions$13.apply(Functions.java:214)
at org.opencastproject.util.data.Function$1.apply(Function.java:101)
at org.opencastproject.index.service.message.MessageReceiverLockService.synchronize(MessageReceiverLockService.java:42)
at org.opencastproject.index.service.message.BaseMessageReceiverImpl$MessageWatcher.run(BaseMessageReceiverImpl.java:139)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Status

Assignee

Matthias Neugebauer

Reporter

Matthias Neugebauer

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

4.0
4.1

Priority

Blocker