I've a stupid doubt in the construction of stochastic integral of real scalar valued maps. Many times I've seen in books after the stochastic integral is defined in [$0,T$] for the integrand in $L^2$ where $E(\int_{0}^{T}f(s)^2ds)<\infty$ we again use localization technique to extend the stochastic integral to more general processes $P(\int_{0}^{T}f(s)^2ds<\infty)=1 $. My questions are
For a finite measure space if a random variable is almost everywhere finite then does not it mean that it expectation is finite? That too when I work in [$0,T$] not in [$0,\infty$]
Can someone give me a counter example stating that a function belonging to the more general localization-technique defined space and not into the $L^2$ space.
I'm omitting the details as these are very standard and can be found in text books.