Upon service of such notice, the court shall have jurisdiction of all persons made respondents to the petition in the manner above provided, and shall, upon a hearing, make a decree determining the validity, nature or extent of any such possible condition or other encumbrance, which shall be effectual to exclude all the respondents from any claim thereunder contrary to such determination, and shall have the same effect as a release by such respondents of such claims. The court may award costs in its discretion.
Mass. Gen. Laws ch. 240, § 14