Commit e806e6b
[IO-891] Fix BoundedReader.skip(long) accounting and bounds handling (#860)
* [IO-891] Fix BoundedReader skip accounting
Limit skip requests to the remaining bound and update charsRead with the actual skipped count.
* [IO-891] Refine BoundedReader skip bounds fix
Keep skip(long) focused on maxCharsFromTargetReader and actual skipped count, without treating mark read-ahead as a hard limit.
* Fix Checkstyle build failure
---------
Co-authored-by: Sarankumar Baskar <sbaskar@redhat.com>
Co-authored-by: Gary Gregory <garydgregory@users.noreply.github.com>1 parent cfe19ad commit e806e6b
2 files changed
Lines changed: 40 additions & 2 deletions
File tree
- src
- main/java/org/apache/commons/io/input
- test/java/org/apache/commons/io/input
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
245 | 275 | | |
0 commit comments