I wrote a customer security trimmer according to this article: https://msdn.microsoft.com/en-us/library/ee819923.aspx
It works in SharePoint 2013.
I set up SharePoint 2016 development enviroment and followed the steps one by one.
However, I encountered a problem that each member of ‘documentCrawlUrls’ is null. The count of ‘documentCrawlUrls’ is correct, and the trimming result is also correct if I set the return values(BitArray).
public BitArray CheckAccess(IList documentCrawlUrls, IList documentAcls, IDictionary sessionProperties, IIdentity passedUserIdentity)
{
}
So, this problem only happens in SharePoint 2016. It is correct in SharePoint 2013.