garydgregory commented on code in PR #441:
URL: https://github.com/apache/commons-compress/pull/441#discussion_r1401176985
##########
src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java:
##########
@@ -565,7 +565,12 @@ public int getHeaderPadCount(final long nameSize) {
}
int size = this.headerSize + 1; // Name has terminating null
if (name != null) {
- size = ExactMath.add(size, nameSize);
+ try {
+ size = ExactMath.add(size, nameSize);
Review Comment:
There a dozen call sites of `ExactMath#add()`; surely it would be redundant
to duplicate this pattern. Why not create a wrapper method in `ExactMath`?
--
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]