Barrister injured in court attack