Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.2
-
Component/s: Streams/Writers
-
Labels:None
Description
BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)
read() checks for pos == max, whereas read(byte[]...) checks for pos >= max.
The latter check is safer (works even if pos overshoots max).