Post MDA-249, the ItemMetadataSupport class has just two remaining methods.
Both have a lot of boilerplate to allow for nullable values which never occur, and a miniscule set of call sites. The method APIs are also at odds with the actual call sites, resulting in extra looping and construction of singleton sets there to make everything fit together. Most of what the class does could be replaced easily with some simple per-{{Item}} loops and the use of the {{ClassToInstanceMultimap#putAll}} method, which for some reason this class ignores (possibly to allow filtering of nulls, again).
We should either keep this, clean it up and move it to an impl package, or just remove it and move the work into the call sites. In the case of the Item#copy use case, the appropriate body can probably be moved into AbstractItem.
Post MDA-249, the
ItemMetadataSupport
class has just two remaining methods.Both have a lot of boilerplate to allow for nullable values which never occur, and a miniscule set of call sites. The method APIs are also at odds with the actual call sites, resulting in extra looping and construction of singleton sets there to make everything fit together. Most of what the class does could be replaced easily with some simple per-{{Item}} loops and the use of the {{ClassToInstanceMultimap#putAll}} method, which for some reason this class ignores (possibly to allow filtering of nulls, again).
We should either keep this, clean it up and move it to an impl package, or just remove it and move the work into the call sites. In the case of the
Item#copy
use case, the appropriate body can probably be moved intoAbstractItem
.