[
https://issues.apache.org/jira/browse/SSHD-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17160723#comment-17160723
]
Lyor Goldstein commented on SSHD-1030:
--------------------------------------
Implemented {{NoneFileSystemFactory}} - see
https://github.com/lgoldstein/mina-sshd/tree/SSHD-1030. Let me know if it
satisfies your needs.
> Provide support for NoFileSystemFactoryProvider
> -----------------------------------------------
>
> Key: SSHD-1030
> URL: https://issues.apache.org/jira/browse/SSHD-1030
> Project: MINA SSHD
> Issue Type: New Feature
> Affects Versions: 2.5.1
> Reporter: David Ostrovsky
> Assignee: Lyor Goldstein
> Priority: Minor
>
> Prior to 2.5.0 release Gerrit was using this was to initialize
> {{FileSystemFactoryProvider}}:
>
> {code:java}
> private void initFileSystemFactory() {
> setFileSystemFactory(
> session ->
> new FileSystem() {
> @Override
> public void close() throws IOException {}
> @Override
> public Iterable<FileStore> getFileStores() {
> return null;
> }
> @Override
> public Path getPath(String arg0, String... arg1) {
> return null;
> }
> @Override
> public PathMatcher getPathMatcher(String arg0) {
> return null;
> }
> @Override
> public Iterable<Path> getRootDirectories() {
> return null;
> }
> @Override
> public String getSeparator() {
> return null;
> }
> @Override
> public UserPrincipalLookupService
> getUserPrincipalLookupService() {
> return null;
> }
> @Override
> public boolean isOpen() {
> return false;
> }
> @Override
> public boolean isReadOnly() {
> return false;
> }
> @Override
> public WatchService newWatchService() throws IOException {
> return null;
> }
> @Override
> public FileSystemProvider provider() {
> return null;
> }
> @Override
> public Set<String> supportedFileAttributeViews() {
> return null;
> }
> });
> }
> {code}
> After the migration to release 2.5.1 it doesn't compile any more, because the
> {{FileSystemFactory}} factory is not \{{FunctionalInterface}} any more, as it
> has two methods now.
> We could do something like this:
> {code:java}
> private void initFileSystemFactory() {
> setFileSystemFactory(NativeFileSystemFactory.INSTANCE);
> }
> {code}
> But given that we are not using sftp, it could be even safer to just say:
> {code:java}
> private void noFileSystemFactory() {
> setFileSystemFactory(NoFileSystemFactory.INSTANCE);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]