Description
The recent changes introduced by XWIKI-8398 no longer allow a caller to do something like
doc.setAttachmentList(doc.getAttachmentList())
If you consider that before the setter, the caller would add some attachments to the list, this makes it impossible to reuse the list returned by the getter.
Some code, like the xmldoc-update-plugin is now failing because it reuses the list returned by the getter and is now, practically, only clearing the attachment list instead of setting new attachments.
A simple solution is to check in the setter if the new list is the same instance as the internal one and, if so, do nothing, because the list was already modified externally.
Attachments
Issue Links
- is related to
-
XWIKI-8398 Content dirty flag isn't cleared when document is loaded
- Closed