New york constitution
Article VI: judiciary
Section 21

d. When a vacancy shall occur, otherwise than by expiration of term, in the office of judge of the district court, it shall be filled for a full term at the next general election held not less than three months after such vacancy occurs and, until the vacancy shall be so filled, the board of supervisors or the supervisor or supervisors of the affected district if such district consists of a portion of a county or, in counties with an elected county executive officer, such county executive officer may, subject to confirmation by the board of supervisors or the supervisor or supervisors of such district, fill such vacancy by an appointment which shall continue until and including the last day of December next after the election at which the vacancy shall be filled.