Details
Description
XWikiDocument.getXObject(EntityReference, int, boolean, XWikiContext) simply checks if there is any XObject for the given class and returns it instead of checking if there is one with the given number. Consequently, objects are also only created when there is no existing object of the given class.