pjfanning commented on code in PR #1053:
URL: https://github.com/apache/poi/pull/1053#discussion_r3154699995
##########
poi-scratchpad/src/main/java/org/apache/poi/hslf/blip/WMF.java:
##########
@@ -90,7 +90,8 @@ protected byte[] formatImageForSlideshow(byte[] data) {
header.setZipSize(compressed.length);
byte[] checksum = getChecksum(data);
- byte[] rawData = new byte[checksum.length * getUIDInstanceCount() +
header.getSize() + compressed.length];
+ long size = (long)checksum.length * getUIDInstanceCount() +
header.getSize() + compressed.length;
Review Comment:
Move this calculation and the other new calculations in the PR to a shared
method that can be tested in your tests. Your tests don't seem to test the code
and don't seem to provide any regression protection for the future. I only have
my phone with me so I may have missed something but my cursory check of the new
code makes me suspicious that this new code is maintainable.
--
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]