You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ohad R (JIRA)" <ji...@apache.org> on 2018/06/08 14:42:00 UTC

[jira] [Updated] (IO-579) FilenameUtils.isExtension() is case-sensitive

     [ https://issues.apache.org/jira/browse/IO-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ohad R updated IO-579:
----------------------
    Description: 
FilenameUtils.isExtension() is case-sensitive. 

All 3 implementations of this method call String.equals() rather than equalsIgnoreCase(), so it means that if my extension is "jpg", for example, and my filename is something.JPG, the method (any of them) will return 'false'.

 

fix suggestion: should use the method [FilenameUtils.eqauls(...)|https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/FilenameUtils.java#L1200]

 

  was:
FilenameUtils.isExtension() is case-sensitive. 

All 3 implementations of this method call String.equals() rather than equalsIgnoreCase(), so it means that if my extension is "jpg", for example, and my filename is something.JPG, the method (any of them) will return 'false'.

 

fix suggestion: should use the method [FilenameUtils.eqauls(...) |https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/FilenameUtils.java#L1200

 


> FilenameUtils.isExtension() is case-sensitive
> ---------------------------------------------
>
>                 Key: IO-579
>                 URL: https://issues.apache.org/jira/browse/IO-579
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.6
>            Reporter: Ohad R
>            Priority: Major
>              Labels: easyfix
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> FilenameUtils.isExtension() is case-sensitive. 
> All 3 implementations of this method call String.equals() rather than equalsIgnoreCase(), so it means that if my extension is "jpg", for example, and my filename is something.JPG, the method (any of them) will return 'false'.
>  
> fix suggestion: should use the method [FilenameUtils.eqauls(...)|https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/FilenameUtils.java#L1200]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)