(Re)suppress deprecation warnings
See gh-33780
This commit is contained in:
@@ -280,7 +280,7 @@ class AnnotationDrivenEventListenerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({"deprecation", "removal"})
|
||||
void listenableFutureReply() {
|
||||
load(TestEventListener.class, ReplyEventListener.class);
|
||||
org.springframework.util.concurrent.SettableListenableFuture<String> future =
|
||||
|
||||
@@ -275,7 +275,7 @@ class AsyncAnnotationBeanPostProcessorTests {
|
||||
|
||||
Future<Object> failWithFuture();
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({"deprecation", "removal"})
|
||||
org.springframework.util.concurrent.ListenableFuture<Object> failWithListenableFuture();
|
||||
|
||||
void failWithVoid();
|
||||
@@ -310,7 +310,7 @@ class AsyncAnnotationBeanPostProcessorTests {
|
||||
|
||||
@Async
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({"deprecation", "removal"})
|
||||
public org.springframework.util.concurrent.ListenableFuture<Object> failWithListenableFuture() {
|
||||
throw new UnsupportedOperationException("failWithListenableFuture");
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
*/
|
||||
@SuppressWarnings({ "resource", "deprecation" })
|
||||
@SuppressWarnings({"resource", "deprecation", "removal"})
|
||||
class AsyncExecutionTests {
|
||||
|
||||
private static String originalThreadName;
|
||||
|
||||
@@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
class AsyncResultTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
public void asyncResultWithCallbackAndValue() throws Exception {
|
||||
String value = "val";
|
||||
final Set<String> values = new HashSet<>(1);
|
||||
@@ -54,7 +54,7 @@ class AsyncResultTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
public void asyncResultWithCallbackAndException() {
|
||||
IOException ex = new IOException();
|
||||
final Set<Throwable> values = new HashSet<>(1);
|
||||
@@ -71,15 +71,15 @@ class AsyncResultTests {
|
||||
});
|
||||
assertThat(values).singleElement().isSameAs(ex);
|
||||
assertThatExceptionOfType(ExecutionException.class)
|
||||
.isThrownBy(future::get)
|
||||
.withCause(ex);
|
||||
.isThrownBy(future::get)
|
||||
.withCause(ex);
|
||||
assertThatExceptionOfType(ExecutionException.class)
|
||||
.isThrownBy(future.completable()::get)
|
||||
.withCause(ex);
|
||||
.isThrownBy(future.completable()::get)
|
||||
.withCause(ex);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
public void asyncResultWithSeparateCallbacksAndValue() throws Exception {
|
||||
String value = "val";
|
||||
final Set<String> values = new HashSet<>(1);
|
||||
@@ -92,7 +92,7 @@ class AsyncResultTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
public void asyncResultWithSeparateCallbacksAndException() {
|
||||
IOException ex = new IOException();
|
||||
final Set<Throwable> values = new HashSet<>(1);
|
||||
@@ -100,11 +100,11 @@ class AsyncResultTests {
|
||||
future.addCallback(result -> new AssertionError("Success callback not expected: " + result), values::add);
|
||||
assertThat(values).singleElement().isSameAs(ex);
|
||||
assertThatExceptionOfType(ExecutionException.class)
|
||||
.isThrownBy(future::get)
|
||||
.withCause(ex);
|
||||
.isThrownBy(future::get)
|
||||
.withCause(ex);
|
||||
assertThatExceptionOfType(ExecutionException.class)
|
||||
.isThrownBy(future.completable()::get)
|
||||
.withCause(ex);
|
||||
.isThrownBy(future.completable()::get)
|
||||
.withCause(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
void submitListenableRunnable() {
|
||||
TestTask task = new TestTask(this.testName, 1);
|
||||
// Act
|
||||
@@ -156,7 +156,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
void submitFailingListenableRunnable() {
|
||||
TestTask task = new TestTask(this.testName, 0);
|
||||
org.springframework.util.concurrent.ListenableFuture<?> future = executor.submitListenable(task);
|
||||
@@ -185,7 +185,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
void submitListenableRunnableWithGetAfterShutdown() throws Exception {
|
||||
org.springframework.util.concurrent.ListenableFuture<?> future1 = executor.submitListenable(new TestTask(this.testName, -1));
|
||||
org.springframework.util.concurrent.ListenableFuture<?> future2 = executor.submitListenable(new TestTask(this.testName, -1));
|
||||
@@ -260,7 +260,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
void submitListenableCallable() {
|
||||
TestCallable task = new TestCallable(this.testName, 1);
|
||||
// Act
|
||||
@@ -275,7 +275,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
void submitFailingListenableCallable() {
|
||||
TestCallable task = new TestCallable(this.testName, 0);
|
||||
// Act
|
||||
@@ -291,7 +291,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
@SuppressWarnings({ "deprecation", "removal" })
|
||||
void submitListenableCallableWithGetAfterShutdown() throws Exception {
|
||||
org.springframework.util.concurrent.ListenableFuture<?> future1 = executor.submitListenable(new TestCallable(this.testName, -1));
|
||||
org.springframework.util.concurrent.ListenableFuture<?> future2 = executor.submitListenable(new TestCallable(this.testName, -1));
|
||||
|
||||
Reference in New Issue
Block a user