Hello bcason,
Thank you for your reply. A few paragraphs above that example code snippet is the following:
"Each incident has a ContentItem associated with it that
describes the item. For example, the ContentItem can be a file, an SQL database
row, or an email message that caused the incident. Verify that the item is of the
right type for your plug-in action."
According to the Javadoc, the ExchangeItem sub-interface is the most appropriate output if the incident was generated by an email- the output of getContentItem can be one of many sub-interfaces, not just FileServerItem. The ExchangeItem sub-interface is what I would expect to receive for an email incident as it contains a method to extract the recipients- the end objective.
In my testing, the output of getContentItem was always null, so the instanceof test is false and throws the exception.
If there is a different way to programmatically get the list of recipients of emails that generated incidents, I am open to all suggestions.