Finite-size effects for jet quenching