The FileContentEventListener assumes that the event contains a user (originatingUser.getKey().getStringValue()). If the event is called outside the scope of a request (from a scheduled job for example) then there will be no user and this code will cause a NPE.

      Suggest to guard against this possibility by properly checking for NULL.

      Set to minor because it looks like the exception is logged but there is no impact to the original request, but there will probably be an impact in the fact that the eventPublisher is not called.

            [CONFSERVER-40618] NullPointerException in FileContentEventListener

            Minh Tran added a comment -

            Dear All,

            This ticket has been marked as duplicate. Please follow the progress here https://jira.atlassian.com/browse/CONF-39905

            Thanks,
            Minh Tran
            Confluence BugMaster
            Atlassian

            Minh Tran added a comment - Dear All, This ticket has been marked as duplicate. Please follow the progress here https://jira.atlassian.com/browse/CONF-39905 Thanks, Minh Tran Confluence BugMaster Atlassian

            I can also confirm that this is happening with Confluence 5.8.18. Doesn't seem to be happening with 5.7.x and lower

            Dmitry [Lucidchart] added a comment - I can also confirm that this is happening with Confluence 5.8.18. Doesn't seem to be happening with 5.7.x and lower

              Unassigned Unassigned
              mjensen m@ (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: