Hitler was sent to a gentlemen's prison (Festungshaft) for high treason with a sentence of five years, but released after eight months. That is completely ridiculous for high treason. The regular sentence was life, the absolute minimum in case of exonerating circumstances (in this case most likely being right-wing, sorry, "wanting the best for his country") was five years. I'm pretty sure that he would have spent life, or at least many years, in prison if he had been a communist.