Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Having had a quick look at the CryptoInputStream class, it's not in sync with all the other filesystem's exception logic, as specified in src/site/markdown/filesystem/fsdatainputstream.md
Operations MUST throw an IOException on out of bounds reads, ideally EOFException :
- read(byte[] b, int off, int len)
- {{seek(long pos) }}
- seekToNewSource
The tests you want to extend to verify expected behaviour are in AbstractContractOpenTest and AbstractContractSeekTest
also, the HasEnhancedByteBufferAccess implementations may want to think about using checkStream() before acting on a potentially closed stream.