Details
- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
Major
 - 
    2.2.6, 2.3.1, 2.4 M1
 - 
    None
 
- 
        Unknown
 - 
        
 
Description
Here is a sample use case that goes wrong:
XWikiDocument xwikiDoc = xwiki.getXWiki().getDocument(new DocumentReference("xwiki", "XWiki", 'LDAPProfileClass'), xcontext.getContext()); BaseClass bc = xwikiDoc.getXClass();
After the above, the following is not true if the current wiki is not the Main wiki:
xwikiDoc.getDocumentReference() == bc.getDocumentReference()