Copilot commented on code in PR #11499:
URL: https://github.com/apache/ozone/pull/11499#discussion_r4251765503
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/checksum/BaseFileChecksumHelper.java:
##########
@@ -382,19 +396,39 @@ FileChecksum makeCompositeCrcResult() throws IOException {
CrcComposer.newCrcComposer(toHadoopChecksumType(), blockSizeHint);
byte[] blockChecksumBytes = blockChecksumBuf.getData();
+ long sumBlockLengths = 0;
Review Comment:
The all-empty case is detected only after constructing `CrcComposer`. In the
real path, every empty block returns from `checksumBlock` before setting
`checksumType`, so `toHadoopChecksumType()` throws a `NullPointerException`;
the fake test masks this by setting the type unconditionally. Detect the
all-empty location list before constructing the composer.
--
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]