Consistent use of @Deprecated(since = "6.0")
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ import org.springframework.lang.Nullable;
|
||||
* @see CachingConfigurer
|
||||
* @deprecated as of 6.0 in favor of implementing {@link CachingConfigurer} directly
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class CachingConfigurerSupport implements CachingConfigurer {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -104,7 +104,7 @@ public interface TaskScheduler {
|
||||
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
|
||||
* @deprecated as of 6.0, in favor of {@link #schedule(Runnable, Instant)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
default ScheduledFuture<?> schedule(Runnable task, Date startTime) {
|
||||
return schedule(task, startTime.toInstant());
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public interface TaskScheduler {
|
||||
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
|
||||
* @deprecated as of 6.0, in favor of {@link #scheduleAtFixedRate(Runnable, Instant, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
default ScheduledFuture<?> scheduleAtFixedRate(Runnable task, Date startTime, long period) {
|
||||
return scheduleAtFixedRate(task, startTime.toInstant(), Duration.ofMillis(period));
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public interface TaskScheduler {
|
||||
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
|
||||
* @deprecated as of 6.0, in favor of {@link #scheduleAtFixedRate(Runnable, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
default ScheduledFuture<?> scheduleAtFixedRate(Runnable task, long period) {
|
||||
return scheduleAtFixedRate(task, Duration.ofMillis(period));
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public interface TaskScheduler {
|
||||
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
|
||||
* @deprecated as of 6.0, in favor of {@link #scheduleWithFixedDelay(Runnable, Instant, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
default ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, Date startTime, long delay) {
|
||||
return scheduleWithFixedDelay(task, startTime.toInstant(), Duration.ofMillis(delay));
|
||||
}
|
||||
@@ -240,7 +240,7 @@ public interface TaskScheduler {
|
||||
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
|
||||
* @deprecated as of 6.0, in favor of {@link #scheduleWithFixedDelay(Runnable, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
default ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, long delay) {
|
||||
return scheduleWithFixedDelay(task, Duration.ofMillis(delay));
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface Trigger {
|
||||
* or {@code null} if the trigger won't fire anymore
|
||||
* @deprecated as of 6.0, in favor of {@link #nextExecution(TriggerContext)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
@Nullable
|
||||
default Date nextExecutionTime(TriggerContext triggerContext) {
|
||||
Instant instant = nextExecution(triggerContext);
|
||||
|
||||
@@ -47,7 +47,7 @@ public interface TriggerContext {
|
||||
* @deprecated as of 6.0, in favor on {@link #lastScheduledExecution()}
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
default Date lastScheduledExecutionTime() {
|
||||
Instant instant = lastScheduledExecution();
|
||||
return instant != null ? Date.from(instant) : null;
|
||||
@@ -66,7 +66,7 @@ public interface TriggerContext {
|
||||
* or {@code null} if not scheduled before.
|
||||
* @deprecated as of 6.0, in favor on {@link #lastActualExecution()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
@Nullable
|
||||
default Date lastActualExecutionTime() {
|
||||
Instant instant = lastActualExecution();
|
||||
@@ -85,7 +85,7 @@ public interface TriggerContext {
|
||||
* or {@code null} if not scheduled before.
|
||||
* @deprecated as of 6.0, in favor on {@link #lastCompletion()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
@Nullable
|
||||
default Date lastCompletionTime() {
|
||||
Instant instant = lastCompletion();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.lang.Nullable;
|
||||
* @since 4.1
|
||||
* @deprecated as of 6.0 in favor of implementing {@link AsyncConfigurer} directly
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class AsyncConfigurerSupport implements AsyncConfigurer {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.util.concurrent.SuccessCallback;
|
||||
* @see #forExecutionException(Throwable)
|
||||
* @deprecated as of 6.0, in favor of {@link CompletableFuture}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class AsyncResult<V> implements ListenableFuture<V> {
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -36,7 +36,7 @@ public class FixedDelayTask extends IntervalTask {
|
||||
* @param initialDelay the initial delay before first execution of the task
|
||||
* @deprecated as of 6.0, in favor on {@link #FixedDelayTask(Runnable, Duration, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public FixedDelayTask(Runnable runnable, long interval, long initialDelay) {
|
||||
super(runnable, interval, initialDelay);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class FixedRateTask extends IntervalTask {
|
||||
* @param initialDelay the initial delay before first execution of the task
|
||||
* @deprecated as of 6.0, in favor on {@link #FixedRateTask(Runnable, Duration, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public FixedRateTask(Runnable runnable, long interval, long initialDelay) {
|
||||
super(runnable, interval, initialDelay);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class IntervalTask extends Task {
|
||||
* @param initialDelay the initial delay before first execution of the task
|
||||
* @deprecated as of 6.0, in favor on {@link #IntervalTask(Runnable, Duration, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public IntervalTask(Runnable runnable, long interval, long initialDelay) {
|
||||
this(runnable, Duration.ofMillis(interval), Duration.ofMillis(initialDelay));
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class IntervalTask extends Task {
|
||||
* @param interval how often in milliseconds the task should be executed
|
||||
* @deprecated as of 6.0, in favor on {@link #IntervalTask(Runnable, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public IntervalTask(Runnable runnable, long interval) {
|
||||
this(runnable, Duration.ofMillis(interval), Duration.ZERO);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class IntervalTask extends Task {
|
||||
* Return how often in milliseconds the task should be executed.
|
||||
* @deprecated as of 6.0, in favor of {@link #getIntervalDuration()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public long getInterval() {
|
||||
return this.interval.toMillis();
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public class IntervalTask extends Task {
|
||||
* Return the initial delay before first execution of the task.
|
||||
* @deprecated as of 6.0, in favor of {@link #getInitialDelayDuration()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public long getInitialDelay() {
|
||||
return this.initialDelay.toMillis();
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ public class ScheduledTaskRegistrar implements ScheduledTaskHolder, Initializing
|
||||
* Add a {@code Runnable} task to be triggered at the given fixed-rate interval.
|
||||
* @deprecated as of 6.0, in favor of {@link #addFixedRateTask(Runnable, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public void addFixedRateTask(Runnable task, long interval) {
|
||||
addFixedRateTask(new IntervalTask(task, Duration.ofMillis(interval)));
|
||||
}
|
||||
@@ -324,7 +324,7 @@ public class ScheduledTaskRegistrar implements ScheduledTaskHolder, Initializing
|
||||
* Add a Runnable task to be triggered with the given fixed delay.
|
||||
* @deprecated as of 6.0, in favor of {@link #addFixedDelayTask(Runnable, Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public void addFixedDelayTask(Runnable task, long delay) {
|
||||
addFixedDelayTask(new IntervalTask(task, Duration.ofMillis(delay)));
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
* Create a trigger with the given period in milliseconds.
|
||||
* @deprecated as of 6.0, in favor on {@link #PeriodicTrigger(Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public PeriodicTrigger(long period) {
|
||||
this(period, null);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
* configured on this Trigger later via {@link #setInitialDelay(long)}.
|
||||
* @deprecated as of 6.0, in favor on {@link #PeriodicTrigger(Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public PeriodicTrigger(long period, @Nullable TimeUnit timeUnit) {
|
||||
this(toDuration(period, timeUnit), timeUnit);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
* @since 5.0.2
|
||||
* @deprecated as of 6.0, in favor on {@link #getPeriodDuration()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public long getPeriod() {
|
||||
if (this.chronoUnit != null) {
|
||||
return this.period.get(this.chronoUnit);
|
||||
@@ -138,7 +138,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
* @since 5.0.2
|
||||
* @deprecated as of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public TimeUnit getTimeUnit() {
|
||||
if (this.chronoUnit != null) {
|
||||
return TimeUnit.of(this.chronoUnit);
|
||||
@@ -154,7 +154,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
* provided upon instantiation, the default is milliseconds.
|
||||
* @deprecated as of 6.0, in favor of {@link #setInitialDelay(Duration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public void setInitialDelay(long initialDelay) {
|
||||
if (this.chronoUnit != null) {
|
||||
this.initialDelay = Duration.of(initialDelay, this.chronoUnit);
|
||||
@@ -177,7 +177,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
* @since 5.0.2
|
||||
* @deprecated as of 6.0, in favor on {@link #getInitialDelayDuration()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public long getInitialDelay() {
|
||||
Duration initialDelay = this.initialDelay;
|
||||
if (initialDelay != null) {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class SimpleTriggerContext implements TriggerContext {
|
||||
* @param lastCompletionTime last completion time
|
||||
* @deprecated as of 6.0, in favor of {@link #SimpleTriggerContext(Instant, Instant, Instant)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public SimpleTriggerContext(@Nullable Date lastScheduledExecutionTime, @Nullable Date lastActualExecutionTime,
|
||||
@Nullable Date lastCompletionTime) {
|
||||
|
||||
@@ -106,7 +106,7 @@ public class SimpleTriggerContext implements TriggerContext {
|
||||
* @param lastCompletionTime last completion time
|
||||
* @deprecated as of 6.0, in favor of {@link #update(Instant, Instant, Instant)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public void update(@Nullable Date lastScheduledExecutionTime, @Nullable Date lastActualExecutionTime,
|
||||
@Nullable Date lastCompletionTime) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Juergen Hoeller
|
||||
* @deprecated as of 6.0, with no concrete replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public interface HierarchicalThemeSource extends ThemeSource {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.context.MessageSource;
|
||||
* @see org.springframework.web.servlet.ThemeResolver
|
||||
* @deprecated as of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public interface Theme {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.lang.Nullable;
|
||||
* @see Theme
|
||||
* @deprecated as of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public interface ThemeSource {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ import org.springframework.ui.context.ThemeSource;
|
||||
* @see UiApplicationContextUtils
|
||||
* @deprecated as of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class DelegatingThemeSource implements HierarchicalThemeSource {
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ import org.springframework.ui.context.ThemeSource;
|
||||
* @see org.springframework.context.support.ResourceBundleMessageSource
|
||||
* @deprecated as of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class ResourceBundleThemeSource implements HierarchicalThemeSource, BeanClassLoaderAware {
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
|
||||
* @since 17.06.2003
|
||||
* @deprecated as of 6.0, with no concrete replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class SimpleTheme implements Theme {
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ import org.springframework.ui.context.ThemeSource;
|
||||
* @since 17.06.2003
|
||||
* @deprecated as of 6.0, with no direct replacement
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public abstract class UiApplicationContextUtils {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user