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

Date property generates a NPE when not defined and $doc.display() is used

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      The reason is that the DateProperty class has this code:

      Date date = (Date) value;
      
      // Make sure to store a Date and not some extended Date or it's going to be a nightmare to compare between them
      if (date.getClass() != Date.class) {
      ...
      

      which generates a NPE if date is null...

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: