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

BaseObject#getListValue cause the document metadata dirty flag to be set to true

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 14.0-rc-1, 13.10.3
    • 13.10.2
    • Old Core
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      A pre-condition is to have the document metadata dirty flag to be forced to false before that call.

      The following trace lead to setting the flag to true while using getListValue obviously does not modify any metadata:

      XWikiDocument.setMetaDataDirty(boolean) line: 2148	
      DBStringListProperty(BaseProperty<R>).setValueDirty(boolean) line: 316	
      ListProperty$NotifyList.setOwner(ListProperty) line: 316	
      DBStringListProperty(ListProperty).getList() line: 187	
      DBStringListProperty(ListProperty).getValue() line: 87	
      BaseObject(BaseCollection<R>).getListValue(String) line: 494	
      

      The problem seems to be that the ListProperty#NotifyList has its own dirty flag (which is totally useless as far as I can) and this flag is not resetted when the document flag is resetted, so it's stay to true.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: