Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1624

After deleting a page XWikiDocument.java's getObjectNumbers() returns the wrong value if the page is still cached

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • 1.1 M4
    • {Unused} Core
    • None
    • cache

    Description

      If a page containing objects is deleted, the method getObjectNumbers(String classname) may return a wrong value (instead of 0) as the vector used may null elements after the delete of the page (if still in the cache) which are counted in the returned value.

      Test case:

      1. Create a page containing objects
      2. Delete the page
      3. Examine the values of the following (replacing PAGE_NAME and OBJECT_CLASS as appropriate)
      $xwiki.getDocument("PAGE_NAME").getObjectNumbers("OBJECT_CLASS")
      $xwiki.getDocument("PAGE_NAME").getObjects("OBJECT_CLASS")

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            dward David Ward
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: