This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit e62cd1a67cd035eecf1c42f70358913fd78e0554
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Mar 20 18:12:39 2021 -0400

    Rename param to avoid confusion with NIO Channels.
---
 .../apache/commons/vfs2/provider/sftp/SftpFileSystem.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
index 44be091..7b366b2 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
@@ -191,22 +191,22 @@ public class SftpFileSystem extends AbstractFileSystem {
     /**
      * Returns a channel to the pool.
      *
-     * @param channel the used channel.
+     * @param channelSftp the SFTP channel.
      */
-    protected void putChannel(final ChannelSftp channel) {
+    protected void putChannel(final ChannelSftp channelSftp) {
         if (idleChannel == null) {
             synchronized (this) {
                 if (idleChannel == null) {
                     // put back the channel only if it is still connected
-                    if (channel.isConnected() && !channel.isClosed()) {
-                        idleChannel = channel;
+                    if (channelSftp.isConnected() && !channelSftp.isClosed()) {
+                        idleChannel = channelSftp;
                     }
                 } else {
-                    channel.disconnect();
+                    channelSftp.disconnect();
                 }
             }
         } else {
-            channel.disconnect();
+            channelSftp.disconnect();
         }
     }
 

Reply via email to