A Brooklyn appeals panel has thrown out a 10-year sentence for burglary handed down by a Long Island judge who suggested at sentencing that mitigating factors merited leniency, but repeatedly and mistakenly stated that the law required him to sentence the defendant to at least 10 years in state prison.

The unanimous panel found that the defendant’s waiver of his right to appeal did not bar him from raising this particular issue.