Hi Brian,
Brian Burkhalter je 20. 12. 2017 ob 22:54 napisal:
Hi Peter,
On Dec 20, 2017, at 3:45 AM, Peter Levart <peter.lev...@gmail.com
<mailto:peter.lev...@gmail.com>> wrote:
if (result == null) {
result = copy;
} else {
bufs = new ArrayList<>(8); // <— ?
bufs.add(result);
bufs.add(copy);
}
I am probably missing something here, but if the do-while loop
iterates three or more times with nread > 0 each time won’t data be
lost? Should this not instead be:
if (result == null) {
result = copy;
} else {
if (bufs == null) {
bufs = new ArrayList<>(8);
bufs.add(result);
}
bufs.add(copy);
}
Thanks,
Brian
Yes, of course. Good catch. Next time I should try running the code
before proposing it...
webrev.03 looks good.
Regards, Peter