IDDD_Samples
IDDD_Samples copied to clipboard
Erroneous log id when event store is empty
The method c.s.common.notification.NotificationLogFactory.calculateCurrentNotificationLogId
computes an erroneous NotificationLogId
when the event store is empty. For example NOTIFICATIONS_PER_LOG
is set to 20. Then at line 61, 0 % 20 = 0. Then at line 64 remainder
is set to 20. Finally, at line 67, low
is set to 0 - 20 + 1 = 19.
By changing the condition at line 63 into remainder == 0 && count > 0
, the issue is fixed.
If you would like to make this change and create a pull request, I will merge it. Let me know if you can do this, or if you want me to.
I've done a pull request: https://github.com/VaughnVernon/IDDD_Samples/pull/19
Thanks!