A federal judge apologized to the man accused of opening fire at the White House Correspondents’ Dinner, over concerns about the conditions of his detention.