Man pleads guilty to threatening judge who dismissed 377A challenges