NEXUS-6838: Apply animal sniffer annotation

Change is fine, locally tested, but Animal Sniffer barks on the change
as it uses JRE internal class.