garydgregory commented on code in PR #441:
URL: https://github.com/apache/commons-compress/pull/441#discussion_r1402656352


##########
src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java:
##########
@@ -362,7 +362,11 @@ public int read(final byte[] b, final int off, final int 
len) throws IOException
 
     private long readAsciiLong(final int length, final int radix) throws 
IOException {
         final byte[] tmpBuffer = readRange(length);
-        return Long.parseLong(ArchiveUtils.toAsciiString(tmpBuffer), radix);
+        try {

Review Comment:
   Hi @yakovsh 
   It turns out, we do this kind of Long parse-and-rethrow-IOException in at 
least three other places. I'd think this should be refactored. Also, in total, 
there are ten call sites for Long parsing. Shouldn't all these be addressed 
uniformly in this PR? There are also Integer.parseXXX() calls that likely need 
the same treatment. WDYT?



-- 
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]

Reply via email to