Does the number of bytes read need to be used?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Line 184 does not return the returned number of bytes read. I’m thinking this number might be needed at line 185 when populating the ByteBuffer buf. This way, buf.position() will know exactly how many bytes were read. Maybe not important/needed??
Add len = to line 184?
len = read(b);
buf.put(b, 0, len);
Below is where the number of bytes read can get modified, line 163
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/main/java/loci/common/ByteArrayHandle.java around lines 161-186. Check how read(b) reports its byte count and how ByteBuffer.put affects buf.position(), including short reads. Done means the buffer position reflects the bytes actually read, with the behavior verified against the surrounding method logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100