[
https://issues.apache.org/jira/browse/SSHD-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17164202#comment-17164202
]
David Ostrovsky commented on SSHD-1030:
---------------------------------------
> Let me know if it satisfies your needs.
Thanks! LGTM.
I created custom release with your patch applied, and consumed it in gerrit:
[1].
Can you merge it in main repository so that it could be included in upcoming
release?
Thanks again for quick help.
[1]
[https://gerrit-review.googlesource.com/c/gerrit/+/274055/5/java/com/google/gerrit/sshd/SshDaemon.java#722]
> 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]