Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.4
-
None
-
Unit
-
Description
Because doc.getOriginalDocument() is null.
XWiki#saveDocument should always set an originalDocument, even if it was null before. Otherwise, the behavior is not consistent, as saving a new document does have an originalDocument (for which isNew() will return true), and saving a manually constructed XWikiDocument object (created using new) will have a null originalDocument.