Copilot commented on code in PR #670:
URL: https://github.com/apache/datasketches-java/pull/670#discussion_r2198585082
##########
src/main/java/org/apache/datasketches/filters/bloomfilter/DirectBitArray.java:
##########
@@ -50,19 +57,19 @@ static DirectBitArray initialize(final long numBits, final
WritableMemory wmem)
final int arrayLength = (int) Math.ceil(numBits / 64.0); // we know it'll
fit in an int based on above checks
final long requiredBytes = (2L + arrayLength) * Long.BYTES;
- if (wmem.getCapacity() < requiredBytes) {
- throw new SketchesArgumentException("Provided WritableMemory too small
for requested array length. "
- + "Requited: " + requiredBytes + ", provided capcity: " +
wmem.getCapacity());
+ if (wseg.byteSize() < requiredBytes) {
+ throw new SketchesArgumentException("Provided MemorySegment too small
for requested array length. "
+ + "Requited: " + requiredBytes + ", provided capcity: " +
wseg.byteSize());
Review Comment:
Fix the typos in the exception message: change "Requited" to "Required" and
"capcity" to "capacity".
```suggestion
+ "Required: " + requiredBytes + ", provided capacity: " +
wseg.byteSize());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]