The complaint alleges that plaintiff and the defendants are brothers, sons of John Hull, Sr., who died June 25th, 1897, leaving a last will which was duly admitted to probate, the issuance of letters testamentary thereon to defendant John Hull, Jr., the executor named therein, who duly qualified. That under the terms of said will plaintiff was given a residuary interest of one-seventh in said estate which amounts to more than $1,478.25, no part of which has been paid; that on August 18, 1899, plaintiff at the request of John Hull, Jr., executed, acknowledged and delivered to the latter an assignment, under seal (set out at length in the complaint), which in effect recites that for a valuable consideration paid plaintiff by James Hull and Frank Hull, plaintiff assigned to them all right, title and interest he had in the estate of John Hull, Sr., as legatee or otherwise and authorized the assignees to execute and deliver all vouchers, receipts, etc., in satisfaction thereof. That defendant John Hull, Jr., fraudulently represented to plaintiff that it would be for plaintiff’s interest to execute and deliver said assigmnent, and promised to hold the same in escrow until plaintiff authorized a delivery thereof and in reliance upon such representations the assignment was delivered. That plaintiff never authorized a delivery of the assignment and same was never delivered; that the assignment was without consideration. That James Hull and Frank Hull, defendants, never requested or authorized John Hull, Jr., to procure such assignment for them or either of them. That defendants James and Frank Hull were likewise residuary legatees under the will of their father equally with plaintiff; that defendant John Hull, Jr., as executor has paid to James and Frank Hull the sum of $2,295.58 and $2,398.75 respectively or upwards. That on or about April 13, 1914, without the knowledge or consent of plaintiff, defendant John Hull, Jr., filed his account as executor, together with *347the assignment in Surrogate’s Court and in his account set forth that'a portion of the payments therein made to James and Frank were made pursuant to said assignment; that the sums so paid to them exceeded the amount to which they were entitled under the will and upon such accounting the executor was surcharged for excess payments. That under said assignment defendant John Hull, Jr., claims he paid to James and Frank the sum of $1,478.25, being part of the money to which plaintiff is entitled. The demand for judgment was for a cancellation of the assignment; judgment against John Hull, Jr., for $1,478.25 with interest and in the event of failure to collect the amount of same from him,, judgment against the defendants James Hull and Frank Hull for the same amount.
The defendant John Hull, Jr., denied the material allegations of the complaint, save the relationship of the parties, death of John Hull, Sr., probate of his will, etc.
For a third separate defense John Hull, Jr., alleged that on May 5th, 1914, as executor, etc., of the will of John Hull, Sr., he filed his final account as executor in the Surrogate’s Court together with a petition duly verified praying that his accounts as executor be judicially settled and for his discharge; that a citation was duly issued thereon directed to the plaintiff amongst others, which was personally served on plaintiff ; that plaintiff at all times between the date and delivery of the assignment set out in the complaint, August 18th, 1899, and the accounting of defendant as executor and the decree of the Surrogate’s Court entered thereon, had actual knowledge of the delivery of the assignment to and reliance of all of the defendants thereon and of the payment made by him as executor pursuant to said assignment to the other defendants of the legacy to plaintiff under the will of his father. The making and entry of a decree of the Surrogate’s Court ratifying and *348confirming his accounts as executor and the payments made by him to James and Frank Hull pursuant to said assignment, which facts appeared and were adjudicated on said accounting. That no appeal was taken from the decree entered upon said accounting and the same remains in full force and is a bar to the maintenance of this action.
To that separate defense designated as the third separate defense, plaintiff interposed a demurrer upon the ground that it was insufficient as a defense.
Two additional separate defenses were set forth in the answer of John Hull, Jr., designated as seventh-eighth.
The seventh separate defense alleged in substance that plaintiff was elected to the office of highway commissioner in 1902; that John Hull, Jr., was surety on his bond; that plaintiff converted and embezzled funds of the town in his custody as highway commissioner which defendant John Hull, Jr., was compelled to, and did, pay to the town, viz., $240.16 on January 1, 1905, no part of which has been paid to him by plaintiff and by reason thereof there is due from plaintiff to defendant John Hull, Jr., $240.16 and interest. For an eighth separate defense that he, John Hull, Jr., was an accommodation indorser and guarantor upon a certain promissory note for $438.00 dated October 24, 1904, made by plaintiff which note was transferred to the City National Bank of Binghamton before maturity; that defendant John Hull, Jr., was compelled to and did on January 24, 1905, pay on account thereof the sum of $443.57 and there is due to him from plaintiff $228.56 and interest thereon from January 26, 1905, which sum and the amount set out in the seventh separate defense he sought to counterclaim against plaintiff. To the seventh and eighth separate defenses the plaintiff demurred upon the grounds (1) that as a defense it is insufficient in law upon the face thereof, (2) that as a counterclaim it appears *349on the face thereof (a) that it is not of the character specified in section 501 of the Code of Civil Procedure and (b) that it does not state facts sufficient to constitute a cause of action.
Referring to the pleadings as to the defendant Frank Hull, the defense of former adjudication was pleaded as a separate defense in the answer of the defendant Frank Hull substantially in the form of the third separate defense pleaded in the answer of John Hull, Jr.
For a sixth defense and counterclaim defendant Frank Hull alleged in substance that in the year 1894 the plaintiff together with Frank and James Hull were equal partners in business and continued as such until August, 1899, when the partnership was dissolved; that an account was taken and stated between the parties at that time, which disclosed that plaintiff had withdrawn from the business a sum largely in excess of the amount drawn by the remaining partners: thereupon the plaintiff withdrew from the partnership and in partial payment of the amount due from him to James Hull and Frank Hull executed and delivered to James Hull and Frank Hull an instrument in writing dated August 18th, 1899, whereby he did transfer and deliver all of his right, title and interest in and to the partnership property and assets of the firm, and in and to any balance which might otherwise be payable to him when all of the partnership business and assets should be finally collected, and also duly made, executed and delivered to them an assignment of his interest in the estate of his father which assignment is set forth in the complaint. That by reason of said assignment the defendant Frank Hull received from the proceeds of the business $2,500 and from the estate of John Hull, Sr., $739.12, leaving a balance due him from plaintiff of $97.59 for which amount he demanded judgment as upon counterclaim.
The demurrer interposed by plaintiff to the answer *350of defendant Frank Hull was limited to the sixth defense and counterclaim above referred to and the grounds thereof were, insufficiency in law on the face thereof; that as a counterclaim it is not of the character specified in section 501 of the Code of Civil Procedure and fails to state facts sufficient to constitute a cause of action.
The issues raised by the several demurrers were brought on for trial at the same time, and resulted in one order which recites “ and the attorneys for said defendants having interposed the objection to the plaintiff’s complaint herein that the plaintiff has an adequate remedy at law; that this court as a court of equity will not assume jurisdiction of said action and, therefore, has not jurisdiction of the subject thereof and that plaintiff is not entitled to maintain said action in equity for the relief demanded in said complaint, and that said complaint does not state facts sufficient to constitute a cause of action.” Then follow conclusions, “ That the said complaint fails to state facts sufficient to constitute a cause of action;” that each demurrer should be overruled, “ and plaintiff not asking for or desiring leave to plead over and the counterclaims demurred to being thereby admitted,” -final judgment for each defendant dismissing the complaint upon the merits and for affirmative judgment for each defendant for the amount of his counterclaim, was ordered.
The defendant James Hull did not appear or answer.
Upon the argument of the demurrer to the third separate defense in the answer of the defendant John Hull, Jr., upon the ground of insufficiency said defendant was privileged to and did attack the sufficiency of the complaint under the familiar rule that such a demurrer searches the record for the first fault in pleading and reaches back to condemn the first pleading defective in substance. We are in accord with the conclusion of the courts below that the allegations contained in the com*351plaint were insufficient to support a charge of fraud or to justify a cancellation of the assignment.
Eliminating from the complaint the allegations of fraudulent representations and reliance of plaintiff thereon, the pleading though inártificially-framed does state facts sufficient to constitute a cause of action against John Hull, Jr. The assignment executed by plaintiff, a copy of which is set out in the complaint, is absolute upon the face of same and 'transfers to the assignees therein named all interest of the plaintiff in the estate of his father, stated as of the value of upwards of $1,400. The complaint alleges that plaintiff retained dominion over the instrument; that the assignment was not to have a legal inception until such time as he should direct a delivery of the same to the assignees; that the defendant undertook to act as a depository of the instrument and accepted the same subject to the restrictions and conditions imposed by plaintiff, and in violation of the terms under which he held such instrument, and as we construe the pleading without notice to or knowledge of plaintiff, filed the same together with his final account as executor in Surrogate’s Court, and in his final account claimed that a portion of payments made by him to James and Frank Hull were made pursuant to assignment, thereby in substance alleging that as legatee under the will of his father the title to such legacy was in him and that defendant was required to respond to him for the amount of such legacy, by reason of violation of the agreement under which such assignment was held by defendant.
As bearing upon the sufficiency of the third separate defense in the answe’r of John Hull, Jr., it is essential to consider the jurisdiction of a Surrogate’s Court upon a judicial settlement of the accounts of an executor and the effect of the decree made upon such judicial settlement.
In Matter of Randall (152 N. Y. 508) this court held that upon an accounting in Surrogate’s Court where the *352same distributive share of an estate is claimed by two persons, one, by original title and the other by an assignment apparently valid, resdrt must be had to a court of equity to determine the validity of the assignment as the Surrogate’s Court was clothed with such jurisdiction only as was especially' conferred upon it by statute, or necessarily implied from the power conferred, and the statute as it stood at that time having failed to confer power essential to determine the validity of such assignment the sole remedy to obtain the relief was by resort to a court possessing general equity powers and jurisdiction. In the opinion in that case various' pro visions of the Code applicable to the question were considered in detail, a repetition whereof is unnecessary here.
In 1910 the legislature added a new section to the Code'of Civil Procedure (Section 2472a) which was in force at the time of the proceeding in the Surrogate’s Court and the entry of the decree set out in the third separate defense to which the demurrer was served. The section read: “ The surrogate’s court has also jurisdiction upon a judicial accounting or a proceeding for the payment of a legacy to ascertain the title to any legacy or distributive share, to set off a debt against the same and for that purpose ascertain whether the debt exists, to affect the accounting party with a constructive trust, and to exercise all other power, legal or equitable, necessary to the complete disposition of the matter. He must order the trial of any controverted question of fact of which either party has constitutional right of trial by jury and seasonably demands the same.” (Section 2510, Code, in a modified form in effect September 1st, 1914.)
Indisputably section 2472a of the Code enlarged the jurisdiction of a Surrogate’s Court as it existed prior to the enactment of that section and clothed such court with jurisdiction upon a judicial settlement of the accounts of an executor “ to ascertain the title to any legacy or *353distributive share ” or “ to exercise all other power legal or equitable necessary to the complete disposition of the matter,” a power not theretofore conferred as determined in Matter of Randall.
Upon the judicial settlement of the accounts of John Hull, Jr., as executor, the plaintiff under the provisions of the Code then in force, was a necessary and proper party to the accounting. (Code Civil Proc. sec. 2728.) Having been made a party thereto he was at liberty to file objections to the account presented by the executor and contest the validity of any payments made by the executor to James and Frank Hull under or by reason of the assignment in question, to assert a non-delivery of said instrument to them or an unauthorized possession of said instrument by any of the defendants as evidence of title to the legacy bequeathed to him under the will of his father; to assert title in himself to the legacy and to have the question of title to the same determined in said proceeding.’ Plaintiff omitted to assert his legal rights upon the judicial settlement and the decree of the Surrogate's Court upon such judicial settlement is conclusive evidence against him that the items allowed to the executor for moneys paid to legatees were correct. (Code Civil Proc. sec. 2742.)
The conclusive effect of the decree made on the judicial settlement - was set out in the answer as a bar to the maintenance of this-action.
To sustain a plea of a former judgment in bar of a second action it must appear that the cause of action in both suits is the same or that some fact essential to the maintenance of the second action was in issue and determined in the first action adversely to claimant. In the application of that principle consideration must be given to a further rule of law that a judgment is final and conclusive upon all matters which might have been *354litigated and decided in the action and as to matters which might have been urged as a defense in that action. Under the complaint in this action, briefly stated, the plaintiff would be required to establish a delivery of the assignment to John Hull, Jr., upon the conditions alleged by him, the use of the assignment as a voucher in Surrogate’s Court and payment of his legacy to the other defendants thereunder, and upon such facts would assert that title to the legacy being in him, the liability of the defendant was established in his favor.
The proceeding for a judicial settlement in the Surrogate’s Court was instituted by a petition accompanied by an account of the executor which disclosed payments made by him to James and Frank Hull, including the bequest made to plaintiff for all of which he claimed credit. To justify an allowance of payment to James and Frank Hull of the plaintiff’s legacy, it was essential for the defendant executor to establish title in James and Frank to such legacy and payment of,same to them. Such proof was supplied by the assignment and the voucher for payment signed by James and Frank. I have hereinbefore called attention to the rights of the plaintiff to controvert such facts upon the judicial settlement and the jurisdiction of the Surrogate’s Court to determine as between plaintiff and James and Frank Hull, as well as defendant executor, the title to the legacy now claimed by plaintiff in this action. Applying the rules of law above stated to the facts in this case the conclusion follows that the facts upon which plaintiff must rely to recover under the complaint in this action were material and essential to a determination of the issue involved upon the judicial settlement in the Surrogate’s Court. Every fact stated in the complaint was admissible on the question of title to plaintiff’s legacy upon the judicial settlement of the accounts of the executor in that court. Plaintiff cannot now retry that issue. *355The allegations contained in the third separate defense were sufficient as a defense and constitute a bar to the maintenance of this action.
In view of our determination that the complaint states facts sufficient to constitute a cause of action, a question arises as to that part of the decision of the Special Term upon the trial of the demurrer in so far as it directed a dismissal of the complaint. A reference to what has been written as to the sufficiency of the complaint will disclose that the views expressed are confined solely to the question as to whether or not the complaint as the first pleading was defective in substance and, therefore, is inapplicable to the question about to be considered.
The demurrer to the defense set forth in the answer was upon the ground that it was insufficient in law upon the face thereof. (Code Civil Proc. sec. 494.) By that pleading the plaintiff admitted the facts alleged in the third separate defense and challenged the sufficiency of the same as matter of law.
The issue of law thus presented came on for trial at Special Term as a contested motion. (Code Civil Proc. secs. 969, 976.) Upon the trial of the demurrer the court was required to make a decision which should direct the final or interlocutory judgment to be entered thereon. (Code Civil Proc. secs. 1021, 497.) The court announced its conclusion that the demurrer should be overruled and plaintiff be afforded an opportunity to amend or plead anew. The plaintiff asserted that he did not desire to plead anew or amend, and thereby elected to stand upon his demurrer. The formal decision of the court was thereafter entered and the demurrer allowed to stand as a pleading in the case. Under the determination of the Special Term and the decision made the only judgment remaining to be directed was a final judgment overruling the demurrer and dismissing "the complaint. (National Contracting Co. v. Hudson R. W. P. Co., 110 *356App. Div. 133; Peters v. Needham P. & O. Co., 124 App. Div. 749; Thistle v. Jones, 123 App. Div. 40.)
In view of our conclusion that the complaint does state a cause of action on contract against John Hull, Jr., we may permit plaintiff to withdraw his demurrer to the third separate defense.
The plaintiff also demurred to the seventh and eighth separate defenses set out in the answer of John Hull, Jr., both of which defenses alleged counterclaims against plaintiff in favor of said defendant, one based upon an amount paid by him by reason of his liability as surety upon an official bond in which plaintiff was the principal; the second, upon a promissory note made by plaintiff upon which defendant was an indorser and as such was obliged and did pay the amount of said note.
To each of said defenses the plaintiff demurred upon the grounds (1) that as a defense it is insufficient in law upon the face thereof; (2) that as a counterclaim it appears on the face thereof (a) that it is not of the character specified in section 501 of the Code of Civil Procedure, and (b) that it does not state facts sufficient to constitute a cause of action. The Special Term overruled the demurrer and plaintiff declined to amend. The decision of the court directed that the complaint be dismissed and judgment be entered in favor of defendant for the amount of the counterclaim.
The conclusion of the Special Term that the demurrer be overruled was proper. The complaint as construed by us alleged a contractual relationship between the plaintiff and defendant, John Hull, Jr., and a breach thereof by the latter. The counterclaim set up in defendant’s answer stated a cause of action on contract existing at the commencement of the action. We conclude, however, that it was error to grant judgment in favor of John Hull, Jr:, for the amount of the counterclaims. The only question presented by the demurrer was whether *357or not the counterclaims were properly alleged as such and of the character specified in section 501 of the Code of Civil Procedure. (Fulton County Gas & E. Co. v. Hudson R. Tel. Co., 200 N. Y. 287.)
The defense of former adjudication was also pleaded as a separate defense in the answer of Frank Hull, substantially in the form of the same separate defense pleaded in the answer of John Hull, Jr. The demurrer served by plaintiff to the answer of Frank Hull was limited to the sixth defense and counterclaim set out therein, which stated not only a cause of action arising out of the transaction set forth in the complaint and connected with the subject-matter of the action, but likewise a cause of action upon contract existing at the commencement of the action. The demurrer was, therefore, properly overruled and though the complaint under our construction of the same fails to state a cause of action against Frank Hull, the court was in error in dismissing the complaint as against him, as he was not at liberty to challenge the sufficiency of the same on the argument of that demurrer and awarding him final judgment upon the counterclaim.
The judgment appealed from should be modified by striking therefrom all of the last paragraph thereof commencing with the words, “ Ordered and adjudged,” and by inserting in the place thereof the following:
Ordered and adjudged that the demurrer to the third separate defense in the answer of defendant, John Hull, Jr., be overruled and the complaint as to him be dismissed on the merits, with costs in all courts to be taxed, unless within twenty days plaintiff shall by stipulation duly filed and served withdraw the demurrer and pay to said defendant the costs taxed on the argument of said demurrer, together with costs in the Appellate Division and this court, in which event the complaint shall be allowed to stand.
*358That the demurrer to the seventh and eighth defenses and counterclaims in the answer of John Hull, Jr., be overruled, without costs, with leave to plaintiff to withdraw said demurrer to said counterclaims and defenses and serve a reply thereto within twenty days upon payment of ten dollars costs; and be it further
Ordered and adjudged, that the demurrer to the sixth separate defense and counterclaim in the answer of the defendant, Frank .Hull, be overruled, with costs in all courts; with leave upon payment of said costs within twenty days to withdraw said demurrer and serve a reply; and be it further ordered and adjudged that the judgments below be modified accordingly and as modified affirmed.
His cock, Ch. J., Chase, Collin, Cuddeback, McLaughlin and Crane, JJ., concur.
Judgment accordingly.