Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.3 M2
-
None
-
Unit
-
Unknown
-
Description
Test case:
{{velocity}}
#set($xdoc = $xwiki.getDocument("Sandbox.WebHome"))
##
## Get archive to make sure the problem is not XWIKI-4265
$xdoc.getArchive()
$xdoc.getPreviousVersion()
{{/velocity}}
Try this on a document which has not been altered (v1.1)
Observe NPE
Alter the document and restart the wiki engine (to make absolutely sure it isn't XWIKI-4265).
Run the test, observe no NPE.
What should getPreviousVersion do if there is none? return "0"? return null? Surely not throw NPE.