Effects of energy-level quantization on the supercurrent decay of josephson junctions