Skip to content

Commit

Permalink
NIFI-9939 Upgraded SSHJ from 0.32.0 to 0.33.0
Browse files Browse the repository at this point in the history
- Removed PatchedSFTPEngine with resolution of SFTP renaming in SSHJ 0.33.0

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes apache#5982.
  • Loading branch information
exceptionfactory authored and Gene Hynson committed May 17, 2022
1 parent 12ecf91 commit 061a336
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 75 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import net.schmizz.sshj.sftp.RemoteResourceInfo;
import net.schmizz.sshj.sftp.Response;
import net.schmizz.sshj.sftp.SFTPClient;
import net.schmizz.sshj.sftp.SFTPEngine;
import net.schmizz.sshj.sftp.SFTPException;
import net.schmizz.sshj.xfer.FilePermission;
import net.schmizz.sshj.xfer.LocalSourceFile;
Expand All @@ -42,7 +43,6 @@
import org.apache.nifi.processor.ProcessSession;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.processors.standard.ssh.PatchedSFTPEngine;
import org.apache.nifi.processors.standard.ssh.SSHClientProvider;
import org.apache.nifi.processors.standard.ssh.StandardSSHClientProvider;
import org.apache.nifi.proxy.ProxyConfiguration;
Expand Down Expand Up @@ -596,7 +596,7 @@ protected SFTPClient getSFTPClient(final FlowFile flowFile) throws IOException {

final Map<String, String> attributes = flowFile == null ? Collections.emptyMap() : flowFile.getAttributes();
this.sshClient = SSH_CLIENT_PROVIDER.getClient(ctx, attributes);
this.sftpClient = new SFTPClient(new PatchedSFTPEngine(sshClient).init());
this.sftpClient = new SFTPClient(new SFTPEngine(sshClient).init());
this.closed = false;

// Configure timeout for sftp operations
Expand Down
2 changes: 1 addition & 1 deletion nifi-nar-bundles/nifi-standard-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<dependency>
<groupId>com.hierynomus</groupId>
<artifactId>sshj</artifactId>
<version>0.32.0</version>
<version>0.33.0</version>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
Expand Down

0 comments on commit 061a336

Please sign in to comment.