[ https://issues.apache.org/jira/browse/SSHD-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Ostrovsky updated SSHD-1030: ---------------------------------- Description: 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} was: 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. We could 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} > 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 > 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: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org