On Fri, 22 Jul 2022 19:54:59 GMT, Phil Race <[email protected]> wrote:
> Before although it would jump to zero it would continue to increment and so > the user would know something is happening. Now it just gets to max and looks > "stuck". Actually, the progressbar will be **blank** as ProgressMonitorInputStream will call `setProgress(nread+=nr)` ie with -ve value due to integer overflow so progress bar will not be 0 but somewhat (-)2147483125 so **we will not see any increment** also in the progressbar till it reaches 0 from such -ve value I guess it will be weird to jump back from 99% to ~50% and start again in the same progress monitor (not sure if it's possible also as we support int and not long) so I modified the fix to recalculate the available size after MAX_INT is read and close the current progress monitor and recreate another progress monitor with recalculated max and show the progress from MAX_INT onwards to EOF. > BTW I don't see why you need a large file for a test. You can just have an > InputStream subclass which keeps generating data .. I have added a test. ------------- PR: https://git.openjdk.org/jdk/pull/9588
