You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "CNJingo (via GitHub)" <gi...@apache.org> on 2023/06/26 02:55:36 UTC

[GitHub] [commons-io] CNJingo opened a new pull request, #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

CNJingo opened a new pull request, #462:
URL: https://github.com/apache/commons-io/pull/462

   This change catches the numberFormatException in isIpv4Address and then returns false instead of throwing an exception.


-- 
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: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-io] CNJingo closed pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

Posted by "CNJingo (via GitHub)" <gi...@apache.org>.
CNJingo closed pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers
URL: https://github.com/apache/commons-io/pull/462


-- 
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: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-io] kinow commented on pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #462:
URL: https://github.com/apache/commons-io/pull/462#issuecomment-1606693788

   > Hi @kinow, isIpv4Address method is a private method. there is a way can I test it?
   
   There must be. It must be accessible via a public method somewhere. I think `getPrefixLength` calls` `isIpv6` that calls the `isIpv4`. If that's correct, then a test would have to be written for `getPrefixLength` that triggers the code modified here, otherwise there's no way to make sure that a) it works as expected nor b) that it won't be changed by another dev later.


-- 
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: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-io] CNJingo commented on pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

Posted by "CNJingo (via GitHub)" <gi...@apache.org>.
CNJingo commented on PR #462:
URL: https://github.com/apache/commons-io/pull/462#issuecomment-1606579961

   Hi @kinow, isIpv4Address method is a private method. there is a way can I test it?


-- 
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: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-io] CNJingo commented on pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

Posted by "CNJingo (via GitHub)" <gi...@apache.org>.
CNJingo commented on PR #462:
URL: https://github.com/apache/commons-io/pull/462#issuecomment-1606980143

   I'll close this PR. isIPv4Address method already validate parameter using Matcher with regex '^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$'. I think there is no possibility Integer.parseInt() throws numberFormatException.


-- 
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: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-io] codecov-commenter commented on pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #462:
URL: https://github.com/apache/commons-io/pull/462#issuecomment-1606578366

   ## [Codecov](https://app.codecov.io/gh/apache/commons-io/pull/462?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#462](https://app.codecov.io/gh/apache/commons-io/pull/462?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9092fc7) into [master](https://app.codecov.io/gh/apache/commons-io/commit/dfc986295eb0b0c73033317f2244110c83eec10c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (dfc9862) will **decrease** coverage by `0.04%`.
   > The diff coverage is `50.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #462      +/-   ##
   ============================================
   - Coverage     84.77%   84.74%   -0.04%     
   + Complexity     3345     3344       -1     
   ============================================
     Files           226      226              
     Lines          8048     8051       +3     
     Branches        953      953              
   ============================================
     Hits           6823     6823              
   - Misses          974      976       +2     
   - Partials        251      252       +1     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/commons-io/pull/462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...main/java/org/apache/commons/io/FilenameUtils.java](https://app.codecov.io/gh/apache/commons-io/pull/462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvaW8vRmlsZW5hbWVVdGlscy5qYXZh) | `91.86% <50.00%> (-0.47%)` | :arrow_down: |
   
   ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/commons-io/pull/462/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: notifications-unsubscribe@commons.apache.org

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


[GitHub] [commons-io] CNJingo commented on pull request #462: IO-805 - FilenameUtils.isIPv4Address does not handle illegal integers

Posted by "CNJingo (via GitHub)" <gi...@apache.org>.
CNJingo commented on PR #462:
URL: https://github.com/apache/commons-io/pull/462#issuecomment-1606701576

   @kinow Thanks for the advice. I'll add test code using ```getPrefixLength``` method.


-- 
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: issues-unsubscribe@commons.apache.org

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