A left-continuous cumulative function of an atomic measure with positive masses at a dense countable set has dense discontinuities. Nevertheless it is bounded and monotone on a compact interval, hence a Riemann-integrable function. Finite step-function sums approximate it uniformly because the positive masses are summable. Thus dense discontinuities do not imply failure of the Riemann integral.
For a nonnegative Riemann-integrable function and an interval partition,
Every factor is nonnegative, so multiplication of is legitimate. The final step uses the lower-sum bound on the Riemann integral.