In a DocumentCreated EventListener, if the saved document is modified and saved again, a DocumentCreatedEvent is sent instead of a DocumentUpdatedEvent
It looks indeed incorrect to modiy the document received from the event, for an *ed event. It should at least .clone() it, as per the good practices of working with XWikiDocuments. I am wondering what happens if we do clone that XWikiDocument.
We could close this as invalid, I don't remember the usecase I had (it was 13 years ago), whether I needed absolutely to modify that object and why.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.