From the XWiki source code, I see there is a difference in passing a document to the
evenmanager:
The DocumentDeletingEvent is passing a “new
XWikiDocument(doc.getDocumentReference())"
The DocumentUpdatedEvent (as an example) is passing the doc (the actual XWikiDocument)
The difference is, that the Document passed in the DeleteEvent is a new XWikiDocument and
not the XWikiDocument that is about to be deleted.
Is there a reason why this difference exists?
Br,
Peter