commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikhil Shinde (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IO-540) Ambiguous parameter in AbtractFileFilter.accept(File,String).
Date Wed, 14 Jun 2017 06:14:00 GMT

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

Nikhil Shinde updated IO-540:
-----------------------------
    Summary: Ambiguous parameter in AbtractFileFilter.accept(File,String).   (was: Ambiguous
parameter in AbtractFileFilter.accept(File,String). Change the parameter passed in AbstractFileFilter.accept(File,String),
even if that implementation is not used at runtime  )

> Ambiguous parameter in AbtractFileFilter.accept(File,String). 
> --------------------------------------------------------------
>
>                 Key: IO-540
>                 URL: https://issues.apache.org/jira/browse/IO-540
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Filters
>            Reporter: Nikhil Shinde
>            Priority: Minor
>
> Although we are required to override the AbstractFilteFilter.accept() method to avoid
Infinite loop, the arguments in current implementation seems ambiguous. File.getParentFile()
is passed as argument to FilenameFilter.accept(File,String) overridden method. File.getParentFile()
returns null if parent dir is not known(occurs mostly when using relative path). Java doc
for FilenameFilter.accept() does not mention of allowing null value for File parameter. It
would be better to make change in other arguments passed in accept(File,String).
> No exception occurs at runtime, as overridden method is to be used to avoid Infinite
looping. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message