He took it, and the bug with it, from elsewhere. He didn't "do" the bug either. He just propagated it.
This is even worse. Especially for such classic case as Arrays.sort(). Buggy propagating...
- The sorting algorithm is a tuned quicksort, adapted from Jon
- L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function",
- Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November
- 1993). This algorithm offers n*log performance on many data sets
- that cause other quicksorts to degrade to quadratic performance.
If your usage actually went above 2GB, you would have had a problem. 8192 is not a valid value, we don't support it, and now we'll throw an exception if it's over 2048.
Now I think my actual usage was below 2Gb...
No, we only support a max of 2GB ram buffer, by design currently.
Thanks for confirmation... However, JavaDoc didn't mention explicitly that, and "by design" is unclear wordings... it's already several years "by design"...
2048 probably won't be safe, because a large doc just as the buffer is filling up could still overflow. (Though, RAM is also used eg for norms, so you might squeak by).