-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.6, 5.9.5
-
1
-
Severity 3 - Minor
-
0
-
While trying to render notifications for page edits, PageEditedPayloadTransformer can get NullPointerExceptions while calling getOriginalId. This is because the PageEditedEvent is not required to contain the original page id - it can be null. The code needs to not implicitly cast a Long to a long, since that's causing the null pointer exception in this case.
Example stack trace:
2015-04-08 11:35:19,868 ERROR [AtlassianEvent::CustomizableThreadFactory-4] [confluence.notifications.impl.NotificationsEventDispatcher] errorOrDebug Error during notification dispatch : null -- referer: http://localhost:1990/confluence/admin/viewplugins.action | url: /confluence/admin/olduploadplugin.action | userName: admin | action: olduploadplugin java.lang.NullPointerException at com.atlassian.confluence.notifications.content.transformer.PageEditedPayloadTransformer.getOriginalId(PageEditedPayloadTransformer.java:20) at com.atlassian.confluence.notifications.content.transformer.PageEditedPayloadTransformer.getOriginalId(PageEditedPayloadTransformer.java:12) at com.atlassian.confluence.notifications.content.ContentEditedPayloadTransformer.checkedCreate(ContentEditedPayloadTransformer.java:12) at com.atlassian.confluence.notifications.PayloadTransformerTemplate.create(PayloadTransformerTemplate.java:38) at com.atlassian.confluence.notifications.impl.NotificationsEventDispatcher.handleEventInternal(NotificationsEventDispatcher.java:87) at com.atlassian.confluence.notifications.impl.NotificationsEventDispatcher.handleEvent(NotificationsEventDispatcher.java:58) at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
- is related to
-
CONFSERVER-45018 Provide method to 'removeAttachmentWithoutNotifications' for a specified version of an attachment
- Gathering Interest