Skip to content

Commit dad6742

Browse files
committed
Suppress warnings
1 parent c991aa9 commit dad6742

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ void submitFailingCallableWithErrorHandler() throws Exception {
8888
}
8989

9090
@Test
91+
@SuppressWarnings("deprecation")
9192
void scheduleOneTimeTask() throws Exception {
9293
TestTask task = new TestTask(this.testName, 1);
9394
Future<?> future = scheduler.schedule(task, new Date());
@@ -98,6 +99,7 @@ void scheduleOneTimeTask() throws Exception {
9899
}
99100

100101
@Test
102+
@SuppressWarnings("deprecation")
101103
void scheduleOneTimeFailingTaskWithoutErrorHandler() throws Exception {
102104
TestTask task = new TestTask(this.testName, 0);
103105
Future<?> future = scheduler.schedule(task, new Date());
@@ -106,6 +108,7 @@ void scheduleOneTimeFailingTaskWithoutErrorHandler() throws Exception {
106108
}
107109

108110
@Test
111+
@SuppressWarnings("deprecation")
109112
void scheduleOneTimeFailingTaskWithErrorHandler() throws Exception {
110113
TestTask task = new TestTask(this.testName, 0);
111114
TestErrorHandler errorHandler = new TestErrorHandler(1);

spring-context/src/test/java/org/springframework/scheduling/support/CronTriggerTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 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.
@@ -44,6 +44,7 @@
4444
* @author Juergen Hoeller
4545
* @author Sam Brannen
4646
*/
47+
@SuppressWarnings("deprecation")
4748
class CronTriggerTests {
4849

4950
private final Calendar calendar = new GregorianCalendar();

spring-context/src/test/java/org/springframework/scheduling/support/PeriodicTriggerTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public void fixedDelayFirstExecution() {
4444

4545
@Test
4646
public void fixedDelayWithInitialDelayFirstExecution() {
47+
@SuppressWarnings("deprecation")
4748
Instant now = Instant.now();
4849
long period = 5000;
4950
long initialDelay = 30000;
@@ -83,6 +84,7 @@ public void fixedDelaySubsequentExecution() {
8384

8485
@Test
8586
public void fixedDelayWithInitialDelaySubsequentExecution() {
87+
@SuppressWarnings("deprecation")
8688
Instant now = Instant.now();
8789
long period = 5000;
8890
long initialDelay = 30000;
@@ -121,6 +123,7 @@ public void fixedRateWithTimeUnitFirstExecution() {
121123

122124
@Test
123125
public void fixedRateWithInitialDelayFirstExecution() {
126+
@SuppressWarnings("deprecation")
124127
Instant now = Instant.now();
125128
long period = 5000;
126129
long initialDelay = 30000;
@@ -155,6 +158,7 @@ public void fixedRateSubsequentExecution() {
155158

156159
@Test
157160
public void fixedRateWithInitialDelaySubsequentExecution() {
161+
@SuppressWarnings("deprecation")
158162
Instant now = Instant.now();
159163
long period = 5000;
160164
long initialDelay = 30000;
@@ -177,6 +181,7 @@ public void fixedRateWithTimeUnitSubsequentExecution() {
177181

178182
@Test
179183
public void equalsVerification() {
184+
@SuppressWarnings("deprecation")
180185
PeriodicTrigger trigger1 = new PeriodicTrigger(Duration.ofMillis(3000));
181186
PeriodicTrigger trigger2 = new PeriodicTrigger(Duration.ofMillis(3000));
182187
assertThat(trigger1.equals(new String("not a trigger"))).isFalse();

0 commit comments

Comments
 (0)