Use safe APIs for annotation reading