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

BaseCollection.getXClassReference() returns null for an XClass

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0 M3
    • Fix Version/s: None
    • Component/s: {Unused} Core
    • Labels:
      None
    • keywords:
      core class reference null
    • Difficulty:
      Unknown
    • Similar issues:

      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: