—Appeal by the defendant from a judgment of the Supreme Court, Kings County (Ferdinand, J.), rendered May 7, 1996, convicting him of criminal sale of a controlled substance in or near school grounds and criminal possession of a controlled substance in the third degree, upon a jury verdict, and imposing sentence.
Ordered that the judgment is affirmed.
The defendant claims that the court erred in directing that the courtroom be closed during the testimony of the undercover officer. The testimony at the Hinton hearing (see, People v Hinton, 31 NY2d 71, 76, cert denied 410 US 911) established that *520the officer was to return to the arrest area for future undercover work, had been threatened previously, had been assaulted by a lost subject who identified him as a police officer, and took precautions to keep his identity secret whenever his presence was required at hearings or trials. Closure of the courtroom during the testimony of an undercover police officer was therefore warranted here (see, People v Ramos, 90 NY2d 490, 500, cert denied sub nom. Ayala v New York, 522 US 1002; People v Pearson, 82 NY2d 436, 443; People v Pagan, 245 AD2d 312; People v Green, 244 AD2d 571; People v Whiteside, 243 AD2d 744; People v Pryor, 243 AD2d 656; People v Pastrana, 237 AD2d 628; People v Diaz, 237 AD2d 457; People v Nicot, 237 AD2d 310).
The defendant’s Rosario claim is unpreserved for appellate review, and, in any event, is without merit. The court properly conducted an in camera examination of writings made by the prosecutor during her interview with a police witness (see, People v Barrigar, 233 AD2d 845), and found them to be as the prosecutor represented, that is, either not relevant to the witness, or material that was attorney work product (see, People v Shaw, 212 AD2d 745; People v Roberts, 178 AD2d 622; cf., People v Austin, 75 NY2d 723, 730; People v Gourgue, 239 AD2d 357). O’Brien, J. P., Sullivan, Pizzuto and Joy, JJ., concur.