Bug Description
The SubscriptionItem class throws an IllegalStateException: Duplicate key when processing items with identical names.
The error occurs in:
|
.collect(toMap(Item::getName, item -> buildUrlForItem(item.getHandle()))) |
The Collectors.toMap() method does not allow duplicate keys by default. When multiple items share the same name (= value of dc.title), the collector throws an IllegalStateException.
Bug Description
The
SubscriptionItemclass throws anIllegalStateException: Duplicate keywhen processing items with identical names.The error occurs in:
DSpace/dspace-api/src/main/java/org/dspace/subscriptions/SubscriptionItem.java
Line 43 in 0288c36
The
Collectors.toMap()method does not allow duplicate keys by default. When multiple items share the same name (= value ofdc.title), the collector throws anIllegalStateException.