Whether an advocate sins by defending an unjust cause?

Objections

Objection 1 : It would seem that an advocate does not sin by defending an unjust cause. For just as a physician proves his skill by healing a desperate disease, so does an advocate prove his skill, if he can defend an unjust cause. Now a physician is praised if he heals a desperate malady. Therefore an advocate also commits no sin, but ought to be praised, if he defends an unjust cause.
Objection 2 : Further, it is always lawful to desist from committing a sin. Yet an advocate is punished if he throws up his brief (Decret. II, qu. iii, can. Si quem poenit.). Therefore an advocate does not sin by defending an unjust cause, when once he has undertaken its defense.
Objection 3 : Further, it would seem to be a greater sin for an advocate to use unjust means in defense of a just cause (e.g. by producing false witnesses, or alleging false laws), than to defend an unjust cause, since the former is a sin against the form, the latter against the matter of justice. Yet it is seemingly lawful for an advocate to make use of such underhand means, even as it is lawful for a soldier to lay ambushes in a battle. Therefore it would seem that an advocate does not sin by defending an unjust cause.