Bishop M. Thomas Shaw of the Episcopal Diocese of Massachusetts successfully underwent surgery Friday to remove a mass discovered on his brain, according to the diocese. Shaw, who announced in January his plan to retire next year , had the surgery Friday afternoon after tests Thursday revealed the mass, the diocese said in a post on its website.