Skip to content

Commit 877fa49

Browse files
committed
1 parent 0cee734 commit 877fa49

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpOutboundTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import java.io.FileOutputStream;
3939
import java.io.IOException;
4040
import java.io.InputStream;
41+
import java.io.UncheckedIOException;
4142
import java.lang.reflect.Constructor;
4243
import java.util.ArrayList;
4344
import java.util.Arrays;
@@ -51,7 +52,6 @@
5152
import org.springframework.beans.DirectFieldAccessor;
5253
import org.springframework.beans.factory.BeanFactory;
5354
import org.springframework.context.support.ClassPathXmlApplicationContext;
54-
import org.springframework.core.NestedIOException;
5555
import org.springframework.expression.common.LiteralExpression;
5656
import org.springframework.integration.file.DefaultFileNameGenerator;
5757
import org.springframework.integration.file.remote.FileInfo;
@@ -413,7 +413,7 @@ public void testExists() throws SftpException, IOException {
413413

414414
assertThat(sftpSession.exists("notExist")).isFalse();
415415

416-
assertThatExceptionOfType(NestedIOException.class).
416+
assertThatExceptionOfType(UncheckedIOException.class).
417417
isThrownBy(() -> sftpSession.exists("foo"));
418418
}
419419

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2019 the original author or authors.
2+
* Copyright 2013-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import java.io.IOException;
2929
import java.io.PipedInputStream;
3030
import java.io.PipedOutputStream;
31+
import java.io.UncheckedIOException;
3132
import java.util.ArrayList;
3233
import java.util.List;
3334
import java.util.concurrent.CountDownLatch;
@@ -44,7 +45,6 @@
4445
import org.springframework.beans.factory.annotation.Autowired;
4546
import org.springframework.context.ApplicationContext;
4647
import org.springframework.context.annotation.Bean;
47-
import org.springframework.core.NestedIOException;
4848
import org.springframework.integration.channel.DirectChannel;
4949
import org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer;
5050
import org.springframework.integration.file.FileHeaders;
@@ -578,7 +578,7 @@ public void testSessionExists() throws IOException {
578578

579579
session.close();
580580

581-
assertThatExceptionOfType(NestedIOException.class)
581+
assertThatExceptionOfType(UncheckedIOException.class)
582582
.isThrownBy(() -> session.exists("any"))
583583
.withRootCauseInstanceOf(IOException.class)
584584
.withStackTraceContaining("Pipe closed");

0 commit comments

Comments
 (0)