Skip to content

Commit 321092c

Browse files
committed
Consistent use of @deprecated(since = "6.0")
1 parent 91bca55 commit 321092c

File tree

101 files changed

+174
-174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+174
-174
lines changed

spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurerSupport.java

Lines changed: 2 additions & 2 deletions
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.
@@ -33,7 +33,7 @@
3333
* @see CachingConfigurerSupport
3434
* @deprecated as of 6.0 in favor of implementing {@link JCacheConfigurer} directly
3535
*/
36-
@Deprecated
36+
@Deprecated(since = "6.0")
3737
public class JCacheConfigurerSupport extends CachingConfigurerSupport implements JCacheConfigurer {
3838

3939
@Override

spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java

Lines changed: 2 additions & 2 deletions
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.
@@ -31,7 +31,7 @@
3131
* @see CachingConfigurer
3232
* @deprecated as of 6.0 in favor of implementing {@link CachingConfigurer} directly
3333
*/
34-
@Deprecated
34+
@Deprecated(since = "6.0")
3535
public class CachingConfigurerSupport implements CachingConfigurer {
3636

3737
@Override

spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ default Clock getClock() {
104104
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
105105
* @deprecated as of 6.0, in favor of {@link #schedule(Runnable, Instant)}
106106
*/
107-
@Deprecated
107+
@Deprecated(since = "6.0")
108108
default ScheduledFuture<?> schedule(Runnable task, Date startTime) {
109109
return schedule(task, startTime.toInstant());
110110
}
@@ -139,7 +139,7 @@ default ScheduledFuture<?> schedule(Runnable task, Date startTime) {
139139
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
140140
* @deprecated as of 6.0, in favor of {@link #scheduleAtFixedRate(Runnable, Instant, Duration)}
141141
*/
142-
@Deprecated
142+
@Deprecated(since = "6.0")
143143
default ScheduledFuture<?> scheduleAtFixedRate(Runnable task, Date startTime, long period) {
144144
return scheduleAtFixedRate(task, startTime.toInstant(), Duration.ofMillis(period));
145145
}
@@ -170,7 +170,7 @@ default ScheduledFuture<?> scheduleAtFixedRate(Runnable task, Date startTime, lo
170170
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
171171
* @deprecated as of 6.0, in favor of {@link #scheduleAtFixedRate(Runnable, Duration)}
172172
*/
173-
@Deprecated
173+
@Deprecated(since = "6.0")
174174
default ScheduledFuture<?> scheduleAtFixedRate(Runnable task, long period) {
175175
return scheduleAtFixedRate(task, Duration.ofMillis(period));
176176
}
@@ -208,7 +208,7 @@ default ScheduledFuture<?> scheduleAtFixedRate(Runnable task, long period) {
208208
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
209209
* @deprecated as of 6.0, in favor of {@link #scheduleWithFixedDelay(Runnable, Instant, Duration)}
210210
*/
211-
@Deprecated
211+
@Deprecated(since = "6.0")
212212
default ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, Date startTime, long delay) {
213213
return scheduleWithFixedDelay(task, startTime.toInstant(), Duration.ofMillis(delay));
214214
}
@@ -240,7 +240,7 @@ default ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, Date startTime,
240240
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
241241
* @deprecated as of 6.0, in favor of {@link #scheduleWithFixedDelay(Runnable, Duration)}
242242
*/
243-
@Deprecated
243+
@Deprecated(since = "6.0")
244244
default ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, long delay) {
245245
return scheduleWithFixedDelay(task, Duration.ofMillis(delay));
246246
}

spring-context/src/main/java/org/springframework/scheduling/Trigger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public interface Trigger {
4040
* or {@code null} if the trigger won't fire anymore
4141
* @deprecated as of 6.0, in favor of {@link #nextExecution(TriggerContext)}
4242
*/
43-
@Deprecated
43+
@Deprecated(since = "6.0")
4444
@Nullable
4545
default Date nextExecutionTime(TriggerContext triggerContext) {
4646
Instant instant = nextExecution(triggerContext);

spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ default Clock getClock() {
4747
* @deprecated as of 6.0, in favor on {@link #lastScheduledExecution()}
4848
*/
4949
@Nullable
50-
@Deprecated
50+
@Deprecated(since = "6.0")
5151
default Date lastScheduledExecutionTime() {
5252
Instant instant = lastScheduledExecution();
5353
return instant != null ? Date.from(instant) : null;
@@ -66,7 +66,7 @@ default Date lastScheduledExecutionTime() {
6666
* or {@code null} if not scheduled before.
6767
* @deprecated as of 6.0, in favor on {@link #lastActualExecution()}
6868
*/
69-
@Deprecated
69+
@Deprecated(since = "6.0")
7070
@Nullable
7171
default Date lastActualExecutionTime() {
7272
Instant instant = lastActualExecution();
@@ -85,7 +85,7 @@ default Date lastActualExecutionTime() {
8585
* or {@code null} if not scheduled before.
8686
* @deprecated as of 6.0, in favor on {@link #lastCompletion()}
8787
*/
88-
@Deprecated
88+
@Deprecated(since = "6.0")
8989
@Nullable
9090
default Date lastCompletionTime() {
9191
Instant instant = lastCompletion();

spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurerSupport.java

Lines changed: 2 additions & 2 deletions
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.
@@ -30,7 +30,7 @@
3030
* @since 4.1
3131
* @deprecated as of 6.0 in favor of implementing {@link AsyncConfigurer} directly
3232
*/
33-
@Deprecated
33+
@Deprecated(since = "6.0")
3434
public class AsyncConfigurerSupport implements AsyncConfigurer {
3535

3636
@Override

spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* @see #forExecutionException(Throwable)
4848
* @deprecated as of 6.0, in favor of {@link CompletableFuture}
4949
*/
50-
@Deprecated
50+
@Deprecated(since = "6.0")
5151
public class AsyncResult<V> implements ListenableFuture<V> {
5252

5353
@Nullable

spring-context/src/main/java/org/springframework/scheduling/config/FixedDelayTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class FixedDelayTask extends IntervalTask {
3636
* @param initialDelay the initial delay before first execution of the task
3737
* @deprecated as of 6.0, in favor on {@link #FixedDelayTask(Runnable, Duration, Duration)}
3838
*/
39-
@Deprecated
39+
@Deprecated(since = "6.0")
4040
public FixedDelayTask(Runnable runnable, long interval, long initialDelay) {
4141
super(runnable, interval, initialDelay);
4242
}

spring-context/src/main/java/org/springframework/scheduling/config/FixedRateTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class FixedRateTask extends IntervalTask {
3636
* @param initialDelay the initial delay before first execution of the task
3737
* @deprecated as of 6.0, in favor on {@link #FixedRateTask(Runnable, Duration, Duration)}
3838
*/
39-
@Deprecated
39+
@Deprecated(since = "6.0")
4040
public FixedRateTask(Runnable runnable, long interval, long initialDelay) {
4141
super(runnable, interval, initialDelay);
4242
}

spring-context/src/main/java/org/springframework/scheduling/config/IntervalTask.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class IntervalTask extends Task {
4545
* @param initialDelay the initial delay before first execution of the task
4646
* @deprecated as of 6.0, in favor on {@link #IntervalTask(Runnable, Duration, Duration)}
4747
*/
48-
@Deprecated
48+
@Deprecated(since = "6.0")
4949
public IntervalTask(Runnable runnable, long interval, long initialDelay) {
5050
this(runnable, Duration.ofMillis(interval), Duration.ofMillis(initialDelay));
5151
}
@@ -56,7 +56,7 @@ public IntervalTask(Runnable runnable, long interval, long initialDelay) {
5656
* @param interval how often in milliseconds the task should be executed
5757
* @deprecated as of 6.0, in favor on {@link #IntervalTask(Runnable, Duration)}
5858
*/
59-
@Deprecated
59+
@Deprecated(since = "6.0")
6060
public IntervalTask(Runnable runnable, long interval) {
6161
this(runnable, Duration.ofMillis(interval), Duration.ZERO);
6262
}
@@ -105,7 +105,7 @@ public IntervalTask(Runnable runnable, Duration interval, Duration initialDelay)
105105
* Return how often in milliseconds the task should be executed.
106106
* @deprecated as of 6.0, in favor of {@link #getIntervalDuration()}
107107
*/
108-
@Deprecated
108+
@Deprecated(since = "6.0")
109109
public long getInterval() {
110110
return this.interval.toMillis();
111111
}
@@ -122,7 +122,7 @@ public Duration getIntervalDuration() {
122122
* Return the initial delay before first execution of the task.
123123
* @deprecated as of 6.0, in favor of {@link #getInitialDelayDuration()}
124124
*/
125-
@Deprecated
125+
@Deprecated(since = "6.0")
126126
public long getInitialDelay() {
127127
return this.initialDelay.toMillis();
128128
}

spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public void addCronTask(CronTask task) {
294294
* Add a {@code Runnable} task to be triggered at the given fixed-rate interval.
295295
* @deprecated as of 6.0, in favor of {@link #addFixedRateTask(Runnable, Duration)}
296296
*/
297-
@Deprecated
297+
@Deprecated(since = "6.0")
298298
public void addFixedRateTask(Runnable task, long interval) {
299299
addFixedRateTask(new IntervalTask(task, Duration.ofMillis(interval)));
300300
}
@@ -324,7 +324,7 @@ public void addFixedRateTask(IntervalTask task) {
324324
* Add a Runnable task to be triggered with the given fixed delay.
325325
* @deprecated as of 6.0, in favor of {@link #addFixedDelayTask(Runnable, Duration)}
326326
*/
327-
@Deprecated
327+
@Deprecated(since = "6.0")
328328
public void addFixedDelayTask(Runnable task, long delay) {
329329
addFixedDelayTask(new IntervalTask(task, Duration.ofMillis(delay)));
330330
}

spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class PeriodicTrigger implements Trigger {
6464
* Create a trigger with the given period in milliseconds.
6565
* @deprecated as of 6.0, in favor on {@link #PeriodicTrigger(Duration)}
6666
*/
67-
@Deprecated
67+
@Deprecated(since = "6.0")
6868
public PeriodicTrigger(long period) {
6969
this(period, null);
7070
}
@@ -75,7 +75,7 @@ public PeriodicTrigger(long period) {
7575
* configured on this Trigger later via {@link #setInitialDelay(long)}.
7676
* @deprecated as of 6.0, in favor on {@link #PeriodicTrigger(Duration)}
7777
*/
78-
@Deprecated
78+
@Deprecated(since = "6.0")
7979
public PeriodicTrigger(long period, @Nullable TimeUnit timeUnit) {
8080
this(toDuration(period, timeUnit), timeUnit);
8181
}
@@ -115,7 +115,7 @@ private PeriodicTrigger(Duration period, @Nullable TimeUnit timeUnit) {
115115
* @since 5.0.2
116116
* @deprecated as of 6.0, in favor on {@link #getPeriodDuration()}
117117
*/
118-
@Deprecated
118+
@Deprecated(since = "6.0")
119119
public long getPeriod() {
120120
if (this.chronoUnit != null) {
121121
return this.period.get(this.chronoUnit);
@@ -138,7 +138,7 @@ public Duration getPeriodDuration() {
138138
* @since 5.0.2
139139
* @deprecated as of 6.0, with no direct replacement
140140
*/
141-
@Deprecated
141+
@Deprecated(since = "6.0")
142142
public TimeUnit getTimeUnit() {
143143
if (this.chronoUnit != null) {
144144
return TimeUnit.of(this.chronoUnit);
@@ -154,7 +154,7 @@ public TimeUnit getTimeUnit() {
154154
* provided upon instantiation, the default is milliseconds.
155155
* @deprecated as of 6.0, in favor of {@link #setInitialDelay(Duration)}
156156
*/
157-
@Deprecated
157+
@Deprecated(since = "6.0")
158158
public void setInitialDelay(long initialDelay) {
159159
if (this.chronoUnit != null) {
160160
this.initialDelay = Duration.of(initialDelay, this.chronoUnit);
@@ -177,7 +177,7 @@ public void setInitialDelay(Duration initialDelay) {
177177
* @since 5.0.2
178178
* @deprecated as of 6.0, in favor on {@link #getInitialDelayDuration()}
179179
*/
180-
@Deprecated
180+
@Deprecated(since = "6.0")
181181
public long getInitialDelay() {
182182
Duration initialDelay = this.initialDelay;
183183
if (initialDelay != null) {

spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public SimpleTriggerContext() {
5959
* @param lastCompletionTime last completion time
6060
* @deprecated as of 6.0, in favor of {@link #SimpleTriggerContext(Instant, Instant, Instant)}
6161
*/
62-
@Deprecated
62+
@Deprecated(since = "6.0")
6363
public SimpleTriggerContext(@Nullable Date lastScheduledExecutionTime, @Nullable Date lastActualExecutionTime,
6464
@Nullable Date lastCompletionTime) {
6565

@@ -106,7 +106,7 @@ public SimpleTriggerContext(Clock clock) {
106106
* @param lastCompletionTime last completion time
107107
* @deprecated as of 6.0, in favor of {@link #update(Instant, Instant, Instant)}
108108
*/
109-
@Deprecated
109+
@Deprecated(since = "6.0")
110110
public void update(@Nullable Date lastScheduledExecutionTime, @Nullable Date lastActualExecutionTime,
111111
@Nullable Date lastCompletionTime) {
112112

spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 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.
@@ -26,7 +26,7 @@
2626
* @author Juergen Hoeller
2727
* @deprecated as of 6.0, with no concrete replacement
2828
*/
29-
@Deprecated
29+
@Deprecated(since = "6.0")
3030
public interface HierarchicalThemeSource extends ThemeSource {
3131

3232
/**

spring-context/src/main/java/org/springframework/ui/context/Theme.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 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.
@@ -30,7 +30,7 @@
3030
* @see org.springframework.web.servlet.ThemeResolver
3131
* @deprecated as of 6.0, with no direct replacement
3232
*/
33-
@Deprecated
33+
@Deprecated(since = "6.0")
3434
public interface Theme {
3535

3636
/**

spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 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.
@@ -28,7 +28,7 @@
2828
* @see Theme
2929
* @deprecated as of 6.0, with no direct replacement
3030
*/
31-
@Deprecated
31+
@Deprecated(since = "6.0")
3232
public interface ThemeSource {
3333

3434
/**

spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 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.
@@ -33,7 +33,7 @@
3333
* @see UiApplicationContextUtils
3434
* @deprecated as of 6.0, with no direct replacement
3535
*/
36-
@Deprecated
36+
@Deprecated(since = "6.0")
3737
public class DelegatingThemeSource implements HierarchicalThemeSource {
3838

3939
@Nullable

spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 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,7 +44,7 @@
4444
* @see org.springframework.context.support.ResourceBundleMessageSource
4545
* @deprecated as of 6.0, with no direct replacement
4646
*/
47-
@Deprecated
47+
@Deprecated(since = "6.0")
4848
public class ResourceBundleThemeSource implements HierarchicalThemeSource, BeanClassLoaderAware {
4949

5050
protected final Log logger = LogFactory.getLog(getClass());

spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 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.
@@ -28,7 +28,7 @@
2828
* @since 17.06.2003
2929
* @deprecated as of 6.0, with no concrete replacement
3030
*/
31-
@Deprecated
31+
@Deprecated(since = "6.0")
3232
public class SimpleTheme implements Theme {
3333

3434
private final String name;

spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java

Lines changed: 2 additions & 2 deletions
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.
@@ -33,7 +33,7 @@
3333
* @since 17.06.2003
3434
* @deprecated as of 6.0, with no direct replacement
3535
*/
36-
@Deprecated
36+
@Deprecated(since = "6.0")
3737
public abstract class UiApplicationContextUtils {
3838

3939
/**

0 commit comments

Comments
 (0)