Affects Version/s: 11.4
Fix Version/s: 20.0
To reproduce the error:
To reproduce the error: Go to Forums Tool Click on a Discussion Click on Display Message Content (All messages from all Conversations in that Discussion show up) Click on Reply to any message of any Conversation Click Cancel Reply Title input field gets emptied and the consequent validation error show up on the client's side Whereas on the server's side a NullPointerException not related to that field is triggered
- Go to Forums Tool
- Click on a Discussion
- Click on Display Message Content (All messages from all Conversations in that Discussion show up)
- Click on Reply to any message of any Conversation
- Click Cancel
- Reply Title input field gets emptied and the consequent validation error show up on the client's side
- Whereas on the server's side a NullPointerException not related to that field is triggered
The exception occurs in:
and initially by:
because selectedThreadHead is null.
At step 3 of the testing plan, instead of clicking on a conversation (then the selectedThreadHead is set at this point*), we click on Display Message Content.
This path to reach the conversations never sets the threadHead and therefore, when clicking Reply to one of them and later on Cancel, selectedThreadHead is Null and an error occurs in the backend that makes the front end act up (form fields being cleared out and a unrelated validation error being showed).
*On the other hand, if we follow the other path: clicking a conversation at step 3 calls processActionsDisplayThread() which sets selectedThreadHead = getThreadHeadForMessage(threadMessage) so the problem does not occur in that path when afterwards clicking Reply and Cancel into a Message.
How we solved it:
We set selectedThreadHead when the user clicks Reply to any of the Messages within the Conversations, since there, we know already which conversation we are currently replying to: