Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-56092

NPE in TeamCalendars if part of the UID group has recurrence rule

    XMLWordPrintable

Details

    Description

      Implementing https://jira.atlassian.com/browse/CONFSERVER-55506 introduced a regression to TC.

      Suppose event table contains more than one event with the same UID. At least one event has recurring rule and at least one don't. Please see example below

      mysql> select * from AO_950DC3_TC_EVENTS where vevent_uid='5dafe179-f4c2-4e4f-a99c-1a37e5625633'\G
      *************************** 1. row ***************************
                      ALL_DAY: 0
                      CREATED: 1531458320051
                  DESCRIPTION:
      
      
                          END: 1535547600000
                           ID: 33
                LAST_MODIFIED: 1531458320051
                     LOCATION: ABC
                    ORGANISER: NULL
      RECURRENCE_ID_TIMESTAMP: NULL
              RECURRENCE_RULE: NULL
          REMINDER_SETTING_ID: NULL
                     SEQUENCE: 0
                        START: 1535544000000
              SUB_CALENDAR_ID: 7d76b884-ab0f-43ec-a70e-025ed6002ef9
                      SUMMARY: Some summary 1
                          URL: NULL
                      UTC_END: 1535547600000
                    UTC_START: 1535544000000
                   VEVENT_UID: 5dafe179-f4c2-4e4f-a99c-1a37e5625633
      *************************** 2. row ***************************
                      ALL_DAY: 0
                      CREATED: 1531458320052
                  DESCRIPTION:
      
      
                          END: 1535547600000
                           ID: 34
                LAST_MODIFIED: 1531458320052
                     LOCATION: NULL
                    ORGANISER: NULL
      RECURRENCE_ID_TIMESTAMP: 1535490000000
              RECURRENCE_RULE: NULL
          REMINDER_SETTING_ID: NULL
                     SEQUENCE: 0
                        START: 1535544000000
              SUB_CALENDAR_ID: 7d76b884-ab0f-43ec-a70e-025ed6002ef9
                      SUMMARY: Some summary 2
                          URL: NULL
                      UTC_END: 1535547600000
                    UTC_START: 1535544000000
                   VEVENT_UID: 5dafe179-f4c2-4e4f-a99c-1a37e5625633
      2 rows in set (0.00 sec)
      

      This will led to NPE at SubCalendarEvent#compareWith in the line

      final int periodInDays = Math.abs(Days.daysBetween(originalStartTime, that.originalStartTime).getDays());
      

      due to the fact that originalStartTime is null.

      I'm not sure how valid this iCal configuration is. I wasn't able to reproduce the problem using only TC because I failed to create two events with the same UID but with valid recurrence status. In any case, this problem can be reproduced by using iCal file from outlook.

      Attachments

        Issue Links

          Activity

            People

              dluong Duy Truong Luong
              epyshnograev Efim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: