OPINION OF THE COURT
Nardelli, J.Plaintiff Marguerite Jossel married Mark Appleman on December 13, 1958. They separated in 1978 and, in November 1988, a divorce action was commenced by plaintiff and was not contested. The divorce was granted by order of the Supreme Court, Bronx County, on March 30, 1989. Appleman (the deceased) died two months thereafter, on June 5, 1989. The deceased’s last will and testament had been executed on December 22, 1986, making a specific bequest of paintings to plaintiff and bequeathing his entire residuary estate to her. Pursuant to EPTL 5-1.4, however, such testimentary bequests to his wife were revoked by the divorce. Plaintiff and the deceased were both successful business people (and plaintiff was the life beneficiary of a $2,000,000 trust under the will of another man who had died earlier in the month of the divorce); plaintiff was represented by counsel in obtaining the divorce but testified that she was not advised of the operation of EPTL 5-1.4.
This action now seeks to vacate the divorce on the grounds of mutual mistake and/or misapprehension. The complaint alleges that the parties to the divorce did not know that the divorce would automatically revoke the bequests to plaintiff and alleges that, if they had known, they would not have sought or consented to the divorce. At the nonjury trial, plaintiff presented evidence that a loving relationship between her and the deceased continued after the divorce and testified that she had obtained the divorce in order to be free of financial responsibility for the decedent’s medical bills.
After a nonjury trial the court found that though plaintiff may have been mistaken, it was not shown that the decedent had been mistaken; there was no mutual mistake. Indeed, *57there was no mistake of fact; there was only a mistake as to the legal effect of what was done. Where the parties have made an instrument as they intended it should be, and the instrument expresses the transaction as it was understood and designed to be made, then the party who had an opportunity to know the contents of the instrument cannot obtain cancellation or reformation because he misunderstood the legal effect of the whole or of any of its provisions; equity will not grant a rescission although one of the parties "—and as many cases hold, both of them—” may have mistaken or misconceived its legal effect (3 Pomeroy, Equity Jurisprudence § 843, at 295 [5th ed]). Relief may not be denied "merely because the mistake is one of law rather than one of fact” (CPLR 3005). But "[t]he word to stress is 'merely’. * * * [0]ne cannot draw a total parallel between a mistake of law and a mistake of fact and permit undoing of the transaction for a mistake of law merely because a mistake of fact might have justified it. * * * It is no accident that much of the case law on CPLR 3005 * * * involve examples of its non-application.” (Siegel, Practice Commentaries, McKinney’s Cons Laws of NY, Book 7B, CPLR C3005:l, at 620-621.) The vice of allowing vacatur of the divorce in the instant case is patent: if the deceased had lived for many years by the application of heroic medical measures that consumed all his fortune, plaintiff, by dint of the divorce, would be protected; if he died quickly, as he did, a vacatur of the divorce would allow her to take her residuary bequest. It is not the function of equity to give people that kind of option.
Moreover, and more generally, "as a matter of public policy in order to protect the integrity of the court” (Langdon v Langdon, 138 AD2d 358, lv denied 73 NY2d 702), this Court should not allow itself to become part of the course chosen here. In Langdon a husband had transferred the marital residence into his wife’s sole ownership in order to avoid the claims of creditors. In a subsequent divorce action equitable distributive relief with respect to such residence was denied as a matter of public policy. Similarly, in Farino v Farino (88 AD2d 902), a husband embroiled in marital difficulties had transferred stock to his brother, who promised to return it on request; the husband remarried and, on his death, his then wife, the executrix of his estate, sought to have the stock returned to the estate. The Court noted that the transfer by the deceased was wrongful and relief was denied pursuant to the " 'clean hands’ ” maxim, " 'not as a protection to [the] defendant, but as a disability to the plaintiff,’ ” (supra, at *58903), and as a matter of public policy to protect the integrity of the court. Since the property had been transferred with intent to defraud the decedent’s former spouse, the basis of the suit was "immoral and one to which equity will not lend its aid” (supra, at 903). In Farino, Special Term had held that defendant’s failure to show injury warranted a denial of his motion for summary judgment, but the Appellate Division, Second Department, reversed Special Term’s order and dismissed the complaint.
Indeed, there is authority that the "clean hands” maxim is available only when the party seeking to invoke the doctrine was injured by the conduct relied on (Weiss v Mayflower Doughnut Corp., 1 NY2d 310, 316; Mehlman v Avrech, 146 AD2d 753, 754; Dinerstein v Dinerstein, 32 AD2d 750; Green v Le Beau, 281 App Div 836; 2 Pomeroy, op. cit., § 399, at 99). Yet Pomeroy goes on to state that when property is transferred for the purpose of defrauding creditors and the debtor seeks later to set aside the transfer: "The door of a court of equity is always shut against such a claimant” (2 Pomeroy, id., § 401a, at 108). In addition, the statement with respect to the necessity of injury was not essential to any of the four decisions, three of which involved accountings on the dissolution of partnerships and the fourth of which, Weiss, involved only the violation of a lease by cooking in view of the customers. A transfer to avoid the possible claims of creditors is an altogether different thing. In a more recent partnership dissolution case denying the application of the "clean hands” maxim, the Court of Appeals, instead of repeating the need for the showing of injury, noted that "it is not beyond the power of our courts in any case to deny judicial relief to a litigant who comes into court with unclean hands” (Nishman v De Marco, 62 NY2d 926, 929; emphasis supplied).
Plaintiff’s divorce in order to avoid the claims of possible creditors might, if events had taken a different course, have worked to her advantage. It instead, perhaps inadvertently, effected a redirection of the disposition of the residuary estate. The door of the court should be shut to any attempt to undo that transfer and convert it, in effect, to an option pursuant to which plaintiff would have the best of both possible worlds.
Accordingly, the judgment of the Supreme Court, Bronx County (Anita Florio, J.), entered April 18, 1994, which, after a nonjury trial, dismissed plaintiff’s action seeking to vacate her 1989 divorce on the ground of mutual mistake and/or *59misapprehension, should be affirmed, without costs or disbursements.
Sullivan, J. P., Rubin, Ross and Mazzarelli, JJ., concur.
Judgment, Supreme Court, Bronx County, entered April 18, 1994, affirmed, without costs.