Since, in that loop, you're not actually calling methods that need to call other methods (a la recursion), you're not adding more calls to the stack. You're merely repeating the steps you did most every time through.
Since a StackOverflowError
is only invoked in certain conditions - namely, the calling of another method (which would call more methods), or the allocation of more elements onto the stack, then there's really no way that this particular loop could cause such an error.