[
https://issues.apache.org/jira/browse/FTPSERVER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467069
]
Niklas Gustavsson commented on FTPSERVER-38:
--------------------------------------------
Hi
I'm not sure if it makes any sense to return null from the following methods:
getHomeDirectory()
getCurrentDirectory()
getFileObject()
Wouldn't it be better to return a noop FileObject?
> Could do with clarification about what values the FileSystemView
> implementations can return
> -------------------------------------------------------------------------------------------
>
> Key: FTPSERVER-38
> URL: https://issues.apache.org/jira/browse/FTPSERVER-38
> Project: FtpServer
> Issue Type: Wish
> Reporter: John Wood
> Priority: Trivial
>
> It isn't completely clear whether the FileSystemView implementation can
> return "null" values for the interface methods.
> To put this in context, I am writing a new FileSystemView which basically
> does nothing - i.e. prevents the user from listing files or changing
> directories (all the RETR/STOR stuff will then be handled explicitly by the
> Ftplet I am also writing).
> To this end, I made an implementation of FileSystemView which returns null
> for all the methods (except for changeDirectory() which returns false).
> My question/comment was simply that its not clear whether this is "allowed".
> For example, in most cases where FileSystemView.getFileObject() is called it
> *does* check for null being returned and handles it appropriately.
> Obviously, any problems will simply get caught by the FTP server, but I just
> thought this might need clarifying.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.