Skip to content

Commit c3aa35f

Browse files
mjd507spring-builds
authored andcommitted
Docs: Fix SessionFactory code example for ftp/sftp
Fixes: #10888 The `setTestSession()` method is available in `CachingSessionFactory`, but not in the `DefaultFtpSessionFactory` or `DefaultSftpSessionFactory` implementations. Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com> (cherry picked from commit 0bc5177)
1 parent 8737049 commit c3aa35f

6 files changed

Lines changed: 0 additions & 8 deletions

File tree

src/reference/antora/modules/ROOT/pages/ftp/inbound.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ public class FtpJavaApplication {
237237
sf.setPort(port);
238238
sf.setUsername("foo");
239239
sf.setPassword("foo");
240-
sf.setTestSession(true);
241240
return new CachingSessionFactory<FTPFile>(sf);
242241
}
243242

src/reference/antora/modules/ROOT/pages/ftp/outbound-gateway.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ public class FtpJavaApplication {
327327
sf.setPort(port);
328328
sf.setUsername("foo");
329329
sf.setPassword("foo");
330-
sf.setTestSession(true);
331330
return new CachingSessionFactory<FTPFile>(sf);
332331
}
333332
@@ -366,7 +365,6 @@ public class FtpJavaApplication {
366365
sf.setPort(port);
367366
sf.setUsername("foo");
368367
sf.setPassword("foo");
369-
sf.setTestSession(true);
370368
return new CachingSessionFactory<FTPFile>(sf);
371369
}
372370

src/reference/antora/modules/ROOT/pages/ftp/outbound.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public class FtpJavaApplication {
101101
sf.setPort(port);
102102
sf.setUsername("foo");
103103
sf.setPassword("foo");
104-
sf.setTestSession(true);
105104
return new CachingSessionFactory<FTPFile>(sf);
106105
}
107106
@@ -158,7 +157,6 @@ public class FtpJavaApplication {
158157
sf.setPort(port);
159158
sf.setUsername("foo");
160159
sf.setPassword("foo");
161-
sf.setTestSession(true);
162160
return new CachingSessionFactory<FTPFile>(sf);
163161
}
164162

src/reference/antora/modules/ROOT/pages/sftp/inbound.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ public class SftpJavaApplication {
204204
factory.setUser("foo");
205205
factory.setPassword("foo");
206206
factory.setAllowUnknownKeys(true);
207-
factory.setTestSession(true);
208207
return new CachingSessionFactory<>(factory);
209208
}
210209

src/reference/antora/modules/ROOT/pages/sftp/outbound-gateway.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ public class SftpJavaApplication {
333333
sf.setPort(port);
334334
sf.setUsername("foo");
335335
sf.setPassword("foo");
336-
factory.setTestSession(true);
337336
return new CachingSessionFactory<>(sf);
338337
}
339338

src/reference/antora/modules/ROOT/pages/sftp/outbound.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public class SftpJavaApplication {
9898
factory.setUser("foo");
9999
factory.setPassword("foo");
100100
factory.setAllowUnknownKeys(true);
101-
factory.setTestSession(true);
102101
return new CachingSessionFactory<SftpClient.DirEntry>(factory);
103102
}
104103

0 commit comments

Comments
 (0)