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

BaseCollection.getXClassReference() returns null for an XClass

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 3.0 M3
    • {Unused} Core
    • None
    • core class reference null
    • Unknown

    Description

      How to reproduce:
      1. From a component, run:

      XWiki wiki = deprecatedContext.getWiki();
      DocumentReference rightsClassReference = wiki.getGlobalRightsClass(deprecatedContext).getXClassReference();
      

      where deprecatedContext is obtained from an Execution instance.

      It seems that the if statement in BaseCollection.getXClassReference() does not take into account the fact that, for classes, getRelativeXClassReference() retuns null (according to the javadoc), so the xClassReferenceCache is never initialized.

      Tested on snapshot build.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: