Skip to content

Commit 0cee734

Browse files
committed
spring-projectsGH-3247: Throw UncheckedIOException
1 parent b75f1bd commit 0cee734

File tree

1 file changed

+4
-2
lines changed
  • spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session

1 file changed

+4
-2
lines changed

spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/SftpSession.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.io.IOException;
2020
import java.io.InputStream;
2121
import java.io.OutputStream;
22+
import java.io.UncheckedIOException;
2223
import java.time.Duration;
2324
import java.util.ArrayList;
2425
import java.util.List;
@@ -269,7 +270,7 @@ public boolean rmdir(String remoteDirectory) throws IOException {
269270
}
270271

271272
@Override
272-
public boolean exists(String path) throws IOException {
273+
public boolean exists(String path) {
273274
try {
274275
this.channel.lstat(path);
275276
return true;
@@ -279,7 +280,8 @@ public boolean exists(String path) throws IOException {
279280
return false;
280281
}
281282
else {
282-
throw new NestedIOException("Cannot check 'lstat' for path " + path, ex);
283+
throw new UncheckedIOException("Cannot check 'lstat' for path " + path,
284+
new IOException(ex));
283285
}
284286
}
285287
}

0 commit comments

Comments
 (0)