OPINION OF THE COURT
Michael H. Melkonian, J.In 1986 defendant was convicted after trial in Kings County of the violent felonies of robbery in the first degree and robbery in the second degree. He was sentenced on each count to an indeterminate term of imprisonment of 3V3 to 10 years, with those sentences to run concurrently with each other.
Defendant was released on parole and in 1992 he was arrested again and indicted for two counts of robbery in the first degree, robbery in the second degree and criminal possession of a weapon in the second and third degrees. On the third day of his trial, defendant pleaded guilty to robbery in the first degree with the promise that he would receive an indeterminate term of imprisonment of 10 to 20 years.
On the date of sentence, the court file was unavailable.1 The assigned judge asked if the file was necessary for the defendant to be sentenced. The judge stated, “He pled guilty to robbery in the first degree, the second count of the indictment. He is a second violent felony offender. The predicate statement should have been filed.” The Assistant District Attorney replied, “Your Honor, I didn’t file the predicate felony statement because under his plea he can be sentenced to the ten to twenty.” The judge stated, “Okay, fine. Then let’s just arraign him for sentence.” Thereafter, the defendant was sentenced to 10 to 20 years in prison.
Upon his return to state prison, the New York State Department of Correctional Services (DOCS) realized that defendant was a second violent felony offender and it computed his time to run consecutively to the time he still owed on his 1986 Kings County conviction. In 2006, defendant wrote to the inmate records coordinator of his facility and to the Deputy Commissioner of DOCS, seeking to have his time recalculated to reflect that *386the sentence on his 1992 indictment should run concurrently with the sentence from his 1986 indictment because he was not adjudicated a second violent felony offender. In February 2007, Prisoners’ Legal Services of New York wrote to the Deputy Commissioner reiterating defendant’s request for the recalculation of his time. Defendant’s time was recalculated to reflect his sentences running concurrently with each other and, due to that change, he was released on March 22, 2007. The difference between running defendant’s sentences concurrently, as opposed to consecutively, was that for concurrent sentences defendant’s earliest conditional release date would have been September 1, 2005. If those sentences were calculated to run consecutively, defendant’s earliest conditional release date would be October 4, 2009. After his 2007 release from state prison, defendant filed suit against the State of New York seeking compensation for wrongful confinement for the time period between September 2005 and March 2007.
By letter dated April 2, 2009, DOCS wrote to the court stating that the failure to sentence defendant as a second violent felony offender appeared to render his sentence invalid as a matter of law. The DOCS letter states that “[t]his matter was not brought to the attention of the District Attorney’s Office when it came to light in 2007 because the one-year time limit set forth in CPL 440.40 (1) had long since expired.” The letter further explains that this matter was now brought to the court’s attention in light of the Court of Appeals decision in People v Sparber (10 NY3d 457 [2008]), which acknowledges the Court’s inherent authority to correct its own errors. Thereafter, this court calendared the case, notified defense counsel and the District Attorney’s Office and made arrangements to have the defendant produced.2
When apprised of DOCS’ concerns regarding the failure to adjudicate defendant a second violent felony offender, defendant filed a motion opposing resentencing, arguing that the “Court is without authority to correct Mr. Hudson’s sentence.” Defendant states that to do so is prohibited by the Criminal Procedure Law, a violation of his constitutional right against double jeop*387ardy, a violation of his due process right to be free from vindictive prosecution and fundamentally unfair.
Defendant argues that CPL 440.40 (1) and People v Medina (35 AD3d 163 [1st Dept 2006], lv denied 8 NY3d 925 [2007]), preclude the People from filing a predicate statement at this juncture. In Medina (supra), the prosecutor belatedly realized that the defendant’s prior felony qualified as a predicate felony despite the passage of time between his felony convictions. However, at that point, it was the People’s time within which to file a motion to correct the sentence, as prescribed by CPL 440.40 (1), that had expired. Despite the expiration of the one-year time period, the trial court adjudicated the defendant a second felony offender and resentenced him as such. The Appellate Division reversed, holding that the trial court’s only authority to resentence a defendant upon the People’s motion is found in CPL 440.40 (1). It held that the trial court had acted without authority because more than one year had elapsed between the time of the original sentence and the People’s application for resentence. (Id.)
Defendant asserts that where a defendant has a legitimate expectation of the finality of his sentence, resentencing violates the Double Jeopardy Clauses of the New York State and Federal Constitutions. He states that “the expiration of the statutory period for a prosecutor to appeal a sentence gives a defendant an ‘expectation of finality’ even when the sentence imposed was otherwise illegal.” Defendant reasons that because neither DOCS nor the People previously sought his resentencing and because he was paroled two years ago, “he legitimately believed that he had completed his prison sentence.”
Defendant claims that resentencing would be vindictive because DOCS only seeks resentencing since “Mr. Hudson exercised his right to seek civil compensation for his wrongful confinement of two years.” He states that his right to due process will be violated if he is punished for pursuing a civil suit against the State when the law plainly allows for it. Defendant argues that the court is precluded from resentencing him because a presumption of vindictiveness attaches when any action that would be detrimental to a defendant is taken in retaliation for his exercising his legal right. Finally, defendant submits that to resentence him now would be unfair. He argues that he was properly released and to return him to custody would be cruel.
The People’s response argues that defendant’s original sentence was illegal and the court should exercise its authority *388to resentence him. The People argue that a trial court has inherent authority to correct an illegal sentence. The People state that “defendant has long been aware that his sentence should have included a finding that he was a second violent felony offender” and he should now be adjudicated as such and resentenced accordingly.
The People argue that the Appellate Division’s decision in Medina (supra) is not controlling here. The People state that the subsequent Court of Appeals decisions in People v Sparber (10 NY3d 457 [2008]) and Matter of Garner v New York State Dept. of Correctional Servs. (10 NY3d 358 [2008]) hold that where a mandatory component of a defendant’s sentence is omitted, the court has the authority to resentence the defendant to correct that omission. The People argue that the failure to resentence defendant would require the court to sanction an illegal sentence and it would be an undeserved windfall for defendant. They state that resentencing is necessary so the trial court can remedy this error and they note that neither Sparber nor Garner require that resentencing occur in a specified time frame.
The People assert that resentencing the defendant would not violate his constitutional right against double jeopardy or his right to due process. They argue that defendant could not have relied on the finality of a sentence that was, as pronounced, inherently illegal. The People state that the Double Jeopardy Clause, which protects against a second prosecution for the same offense or multiple punishments for the same offense, is not applicable here because “a sentence does not have the qualities of constitutional finality that attend an acquittal.” (United States v DiFrancesco, 449 US 117, 134 [1980].) They state that defendant’s due process claim is “merely a rehash of his double jeopardy argument” (United States v Smith, 115 F3d 241, 248 [4th Cir 1997]).
The People maintain that CPL 400.15 clearly and plainly states that a defendant be adjudicated a second violent felony offender if he has previously been subjected to a predicate violent felony conviction, that the adjudication is mandatory and any failure to follow it renders a sentence illegal and requires resentencing.
Defendant argues resentencing at this juncture would be violative of the Double Jeopardy Clause which “protects against multiple punishments for the same offense.” (North Carolina v Pearce, 395 US 711, 717 [1969].) However, sentences are not af*389forded the same constitutional finality that attaches to an acquittal (id.), and a double jeopardy claim “would be colorable only if the defendant’s sentence had been increased beyond his legitimate expectations of what the final sentence should be.” (People v Williams, 87 NY2d 1014, 1015 [1996].) Defendant states that when he was paroled in 2005 he had an expectation of finality which precludes resentencing now. Nonetheless, the question for an analysis of double jeopardy is whether that claimed expectation of finality was legitimate. (United States v DiFrancesco, 449 US 117 [1980].) The law is clear that due to the lack of finality accorded to sentences and because defendant “should have been aware” that he should have been adjudicated a second violent felony offender, defendant could not have a legitimate expectation of the finality of an illegal sentence. (McClain v United States, 676 F2d 915, 918 [2d Cir 1982]; People v Melendez, 254 AD2d 74 [1st Dept 1998].) Indeed, defendant’s own letters to DOCS demonstrate that he was aware of the error all along. Therefore, defendant may be resentenced by the court “without running afoul of the Double Jeopardy Clause.” (Earley v Murray, 451 F3d 71, 76 [2d Cir 2006] [citations omitted].)
Defendant argues that resentencing would violate his right to due process. He argues that “the State sought [his] increased punishment of additional jail time only after he filed a civil lawsuit” for compensation for the nearly two years during which he was incarcerated as a second violent felony offender when he was never adjudicated as such. He argues that the imposition of punishment because he “has done what the law plainly allows him to do” (United States v Goodwin, 457 US 368, 372 [1982]) is unconstitutional.
The defendant’s reliance on Goodwin (supra) is misplaced. Goodwin’s case involved the prosecution upgrading charges against him by indicting Goodwin for a felony after he decided to exercise his right to a jury trial on misdemeanor charges. When appealing his felony conviction, Goodwin argued that a presumption of vindictiveness attached, and his right to due process was violated by the prosecutor’s retaliatory actions. Ultimately, the United States Supreme Court upheld Goodwin’s felony conviction. The Court explained that vindictiveness is only presumed under certain circumstances. (Id. at 372.) The Court held that there was no due process violation where the presumption was overcome by objective information and circumstances which demonstrated that the prosecution did not
*390act in bad faith or maliciously. (Goodwin, supra.) The Court also noted that in the absence of any “proof of an improper motive” the presumption of vindictiveness may be overcome so that it does not serve to “block a legitimate response to criminal conduct.” (Id. at 373.)
The facts and circumstances in Goodwin are not analogous to those of defendant here. Goodwin addresses matters of prosecutorial and judicial discretion. The case before this court is concerned with a statutorily mandated procedure that was ignored and omitted by the prosecutor and the sentencing judge. Therefore, in the absence of any “proof of an improper motive,” adjudicating defendant a second violent felony offender is a legitimate response to repeated criminal conduct. (Goodwin at 373.)
Defendant argues that the only procedure by which he may be resentenced is CPL 440.40 (1), “Motion to set aside sentence; by people” which states, “At any time not more than one year after the entry of a judgment, the court in which it was entered may, upon motion of the people, set aside the sentence upon the ground that it was invalid as a matter of law.”
Defendant’s argument that CPL 440.40 (1) provides the only mechanism for defendant to be adjudicated a second violent felony offender and to correct his sentence is simply not true. It is the mechanism by which the People may move to set aside a defendant’s sentence. The legislature has also recognized the possibility of a court’s need to correct a sentence so that it is in accordance with the law.
CPL 430.10, “Sentence of imprisonment not to be changed after commencement” states, “Except as otherwise specifically authorized by law, when the court has imposed a sentence of imprisonment and such sentence is in accordance with the law, such sentence may not be changed, suspended or interrupted once the term or period of the sentence has commenced.” (Emphasis added.)
Preiser, Practice Commentaries (McKinney’s Cons Laws of NY, Book 11 A, CPL 430.10, at 215) addresses “the question of whether a court can change the term of a sentence that has been commenced due to discovery of an error in pronouncing it.” Preiser explains that there are two situations where a trial court may change a sentence. One situation is where there has been an error, such as in the terms of a plea agreement and the mistake must be fixed. The authority for this correction “is based upon the court’s inherent power to correct its mistakes.” *391(Id., citing People v Minaya, 54 NY2d 360 [1981].) Preiser continues, “The other [situation] is where the sentence is defective with respect to a statutory requirement — e.g., that it be consecutive to an existing one, or defendant’s recidivist status” (Id., citing People v DeValle, 94 NY2d 870 [2000]).
CPL 400.15, “Procedure for determining whether defendant is a second violent felony offender” states, in pertinent part, “[t]he provisions of this section govern the procedure that must be followed in any case where it appears that a defendant who stands convicted of a violent felony offense . . . has previously been subjected to a predicate violent felony conviction . . . and may be a second violent felony offender.” (CPL 400.15 [1] [emphasis added].)
With respect to the recidivist statutes such as CPL 400.15, “Procedure for determining whether defendant is a second violent felony offender,” Preiser’s Practice Commentaries notes that
“neither the People nor the court can relieve defendant from the burden of the increased sentence; it is mandatory. Thus, if the district attorney fails or refuses to file the [predicate] statement or if the court decides to ignore the prior convictions and the defendant is sentenced as a first felony offender, the sentence is invalid as a matter of law and the defendant must be returned to the court for resentencing.” (McKinney’s Cons Laws of NY, Book 11A, CPL 400.21, at 12, citing People v Scarbrough, 66 NY2d 673 [1985].)
Accordingly, the stated excuse of the Assistant District Attorney at the time of sentence for not filing a predicate statement which was accepted by the trial court, does not relieve this court of its obligation to resentence defendant in accordance with the mandate of the law.
Former Penal Law § 70.45, “Determinate sentence; post release supervision” stated, in pertinent part, “Each determinate sentence also includes, as part thereof, an additional period of post-release supervision.” (L 1998, ch 1, § 15, eff Aug. 6, 1998.)
Penal Law § 70.45, “Determinate sentence; post release supervision” as amended, now states in pertinent part, “When a court imposes a determinate sentence it shall in each case state not only the term of imprisonment, but also an additional period of post-release supervision” (L 2008, ch 141, § 3, eff June 30, 2008 [emphasis added]).
*392The 2008 amendment to Penal Law § 70.45 was necessitated by the fact that the 1998 legislation that created and mandated a term of postrelease supervision for every determinate sentence went unnoticed by many judges. Therefore, many defendants were sentenced to determinate sentences that did not include a period of postrelease supervision pronounced by a judge. Under those circumstances, DOCS itself, realizing the omission of the required term, imposed upon defendants a period of postrelease supervision. These circumstances are quite similar to those of defendant here. When he was returned to state prison, DOCS recognized that defendant’s status as a second violent felony offender was mandatory and it then calculated his sentences accordingly, without a judge having ever adjudicated him a second violent felony offender. With respect to postrelease supervision, after years of litigation, the state and federal courts have now clarified what is required by law. DOCS does not have the authority to correct a defendant’s sentence and mistakes in sentencing must be addressed by the sentencing court.
In Earley v Murray (451 F3d 71 [2d Cir 2006]), the Second Circuit addressed Earley’s contention that his constitutional rights were violated when DOCS added the mandatory term of postrelease supervision onto his sentence, without it ever having been mentioned by his attorney, the District Attorney or the judge at either his plea or sentence. Defendant wished to be resentenced according to the agreed-upon terms of his plea without postrelease supervision. Citing to Hill v United States ex rel. Wampler (298 US 460 [1936]), the Second Circuit held that Earley’s constitutional rights had been violated by DOCS procedure because “The judgment of the court establishes a defendant’s sentence, and that sentence may not be increased by an administrator’s amendment.” (Earley at 75.) However, the court recognized the mandatory nature of postrelease supervision and it stated that the constitutional infirmity could be remedied by returning the defendant to the sentencing court for a direct proceeding in which the judge “may increase a defendant’s sentence when it has omitted a mandatory component of that sentence.” (Id. at 76.) The court noted that New York courts would decide the procedure by which such resentencing may occur.
Thereafter, the New York State Court of Appeals announced the procedure to be followed in such a situation. In People v Sparber (10 NY3d 457 [2008]), the sentencing court neglected to pronounce the mandated term of postrelease supervision. On *393appeal, defendant argued that the term of postrelease supervision imposed by DOCS “should be stricken from his sentence and deemed a nullity because ‘it was not part of the sentence that the court pronounced orally.’ ” (Id. at 466.) Defendant Sparber, like defendant herein, argued that under GPL 440.40 (1) the People have one year from the date of sentence from which they may move for resentencing. The Court of Appeals rejected Sparber’s position and held that, although many years had passed after the error in defendant’s 2002 sentence, post-release supervision was a mandatory component of defendant’s sentence and the sentencing “error [could] be remedied through resentencing.” (Id. at 469.) The court stated that “the failure to pronounce the required sentence amounts only to a procedural error, akin to a misstatement or clerical error, which the sentencing court could easily remedy.” (Id. at 472.) The Court of Appeals decided that the mandated term of postrelease supervision, previously omitted by the court, would be imposed through resentencing by a judge.
The rationale which required resentencing in Sparber requires resentencing under these analogous circumstances. Where the law mandates that a defendant with a predicate violent felony be so adjudicated but the sentencing court failed to do so, regardless of the passage of time, that error must be remedied by resentencing. This resentencing is not as defendant argues fundamentally unfair, it is a mandatory procedure, the fact of which defendant was well aware for many years.
Therefore, the People are directed to file the appropriate second violent felony offender statement so defendant can be arraigned on it, be adjudicated a second violent felony offender and then be resentenced accordingly.
. The court file was in another court room because the codefendant’s case (Nelson Turpin, charged with an attempt to commit the crime of murder in the first degree, two counts of robbery in the first degree, robbery in the second degree and criminal possession of a weapon in the second and third degrees) had been severed from this defendant.
. Defendant was incarcerated in connection with a Richmond County case where he was arrested for assault in the second degree, resisting arrest, assault in the third degree and harassment in the second degree. Defendant eventually pleaded guilty to resisting arrest and was sentenced to 60 days in jail. Defendant remains in jail on both the attending parole violation and this matter.