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

Name of object should always be set to the name of their document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.7 M2
    • 1.4.1, 1.7 M1
    • None
    • None
    • NPE XWikiDocument
    • Unit

    Description

      When adding an object to a document, the name of the object may not be set to the one of the document which may cause NPE.
      XWikiDocument.addObject() and XWikiDocument.setObject() should set the name of the object to ensure proper naming.

      This can happen when the object was not created by doc.newObject or doc.createObject, which do take care of this, but by BaseClass.newCustomClassInstance, for example.

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              softec Denis Gervalle
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: