Message306710
> That's not true. .read(1) will at most read 1 byte from the stream
> and decode it. There's no way it will return 70 characters.
See the added tests. They are failed without changing the read() method.
.read(1) currently returns all characters from the characters buffer. And this buffer can be not empty after .readline().
I understand the reason of having two limitation parameters in StreamReader.read(). But currently its behavior does not completely match the expected behavior of the read() method with one argument.
Actually size already has been used instead of chars if chars < 0 for reading in a loop. The code can be simplified. |
|
Date |
User |
Action |
Args |
2017-11-22 09:56:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, lemburg |
2017-11-22 09:56:57 | serhiy.storchaka | set | messageid: <1511344617.83.0.213398074469.issue32110@psf.upfronthosting.co.za> |
2017-11-22 09:56:57 | serhiy.storchaka | link | issue32110 messages |
2017-11-22 09:56:57 | serhiy.storchaka | create | |
|