Yonik Seeley wrote:
Your'e right, it does look possible that position info can be lost. The fix probably isn't as simple as copying the position increment in newTok()... the original increment should only be copied for the first token generated.
If something like for (int i = 1, max = queue.size(); i < max; ++i) queue.get(i).setPositionIncrement(1);were added just at the end of the next() method, before returning queue.get(0), that should fix the problem?