The justices upheld the law on its face but ruled it cannot automatically be applied to every person convicted of misdemeanor ...