You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/01/04 10:56:40 UTC

[GitHub] [commons-io] abchaubey opened a new pull request #181: IO-696: Fix IOUtils.toByteArray exception

abchaubey opened a new pull request #181:
URL: https://github.com/apache/commons-io/pull/181


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] abchaubey closed pull request #181: IO-696: Fix IOUtils.toByteArray exception

Posted by GitBox <gi...@apache.org>.
abchaubey closed pull request #181:
URL: https://github.com/apache/commons-io/pull/181


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] abchaubey commented on pull request #181: IO-696: Fix IOUtils.toByteArray exception

Posted by GitBox <gi...@apache.org>.
abchaubey commented on pull request #181:
URL: https://github.com/apache/commons-io/pull/181#issuecomment-754016956


   @garydgregory thanks for comments,  let me know if any further analysis needs to be done to identify all such scenarios in commons-io


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] garydgregory commented on pull request #181: IO-696: Fix IOUtils.toByteArray exception

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #181:
URL: https://github.com/apache/commons-io/pull/181#issuecomment-753983815


   Hi @abchaubey 
   Thank you for your PR.
   I think we need to consider taking a look at all of Commons IO and consider if this is a task we want to do consistently: When do we throw an IOException vs IllegalArgumentException vs IllegalStateException vs UnsupportedOperationException and so on. 
   So IOW, let's pause and all think about this instead of doing a one-off PR here...
   This case in particular is interesting because the exception is thrown because the expected input does not match the actual file, so either the input is wrong (IAE) OR something went wrong while reading the file (IOEx). So either might be OK here. One general rule could be that IOEx all come from the JRE... needs further thought...


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] garydgregory edited a comment on pull request #181: IO-696: Fix IOUtils.toByteArray exception

Posted by GitBox <gi...@apache.org>.
garydgregory edited a comment on pull request #181:
URL: https://github.com/apache/commons-io/pull/181#issuecomment-753983815


   Hi @abchaubey 
   Thank you for your PR.
   I think we need to consider taking a look at all of Commons IO and consider if this is a task we want to do consistently: When do we throw an IOException vs IllegalArgumentException vs IllegalStateException vs UnsupportedOperationException and so on. 
   So IOW, let's pause and all think about this instead of doing a one-off PR here...
   This case in particular is interesting because the exception is thrown because the expected input does not match the actual file, so either the input is wrong (IAE) OR something went wrong while reading the file (IOEx). So either exception might be valid here. One general rule could be that IOEx all come from the JRE... needs further thought...


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] coveralls commented on pull request #181: IO-696: Fix IOUtils.toByteArray exception

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #181:
URL: https://github.com/apache/commons-io/pull/181#issuecomment-753937383


   
   [![Coverage Status](https://coveralls.io/builds/36062022/badge)](https://coveralls.io/builds/36062022)
   
   Coverage remained the same at 88.644% when pulling **f7b0581ebdad813129d7e2fe6ee711b57e8aafff on abchaubey:master** into **4efd2b276417ff7299881e55293e91d791109451 on apache:master**.
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] abchaubey commented on pull request #181: IO-696: Fix IOUtils.toByteArray exception

Posted by GitBox <gi...@apache.org>.
abchaubey commented on pull request #181:
URL: https://github.com/apache/commons-io/pull/181#issuecomment-776386292


   Deleting this PR as changes are already taken care of


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org