Nothing is an offence which is done by a Judge when acting judicially in the exercise of any power which is, or which in good faith he believes to be, given to him by law.
In Simple Words
A judge acting in a judicial capacity is not committing an offence.