diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurerSupport.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurerSupport.java index b20755c8d98..76f4b457026 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurerSupport.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurerSupport.java @@ -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.lang.Nullable; * @see CachingConfigurerSupport * @deprecated as of 6.0 in favor of implementing {@link JCacheConfigurer} directly */ -@Deprecated +@Deprecated(since = "6.0") public class JCacheConfigurerSupport extends CachingConfigurerSupport implements JCacheConfigurer { @Override diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java index 61d88ec5959..16886ff13f8 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurerSupport.java @@ -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 diff --git a/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java index 79be3a55729..70fe95102cd 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java +++ b/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java @@ -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)); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/Trigger.java b/spring-context/src/main/java/org/springframework/scheduling/Trigger.java index baf21776aff..27bbd387cde 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/Trigger.java +++ b/spring-context/src/main/java/org/springframework/scheduling/Trigger.java @@ -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); diff --git a/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java b/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java index 933c1dde16d..87d9a072ec3 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java +++ b/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java @@ -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(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurerSupport.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurerSupport.java index a3cece5a64d..bf7a2d0baf6 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurerSupport.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurerSupport.java @@ -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 diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java index b38a9ed90f9..fb72172b405 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java @@ -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 implements ListenableFuture { @Nullable diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/FixedDelayTask.java b/spring-context/src/main/java/org/springframework/scheduling/config/FixedDelayTask.java index 68f04bd682a..5f3038dbc4e 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/FixedDelayTask.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/FixedDelayTask.java @@ -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); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/FixedRateTask.java b/spring-context/src/main/java/org/springframework/scheduling/config/FixedRateTask.java index 73b7cf1707b..99350a1e3bd 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/FixedRateTask.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/FixedRateTask.java @@ -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); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/IntervalTask.java b/spring-context/src/main/java/org/springframework/scheduling/config/IntervalTask.java index dd9aeec54e0..a0a44146ba5 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/IntervalTask.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/IntervalTask.java @@ -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(); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java index dd692b1374e..df2ee91a23e 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java @@ -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))); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java index e13ca9489d3..9dd3883ea9e 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java @@ -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) { diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java b/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java index d6fe019afde..740f905c0ac 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java @@ -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) { diff --git a/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java index b0b56c47f10..81027c6ffc3 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java @@ -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 { /** diff --git a/spring-context/src/main/java/org/springframework/ui/context/Theme.java b/spring-context/src/main/java/org/springframework/ui/context/Theme.java index abdcf0dc24d..a24e66ca12d 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/Theme.java +++ b/spring-context/src/main/java/org/springframework/ui/context/Theme.java @@ -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 { /** diff --git a/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java index 28cfb34648a..e55f2a41d0a 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java @@ -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 { /** diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java index 89e2f278af5..1c777a5b6c1 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java @@ -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 diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java index eb2b3c22045..0a18a57c2e2 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java @@ -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()); diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java b/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java index 6fb3df144eb..5b386310f54 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java @@ -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; diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java b/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java index 3a49134e0c8..20d71999c39 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java @@ -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 { /** diff --git a/spring-core/src/main/java/org/springframework/core/NestedExceptionUtils.java b/spring-core/src/main/java/org/springframework/core/NestedExceptionUtils.java index 2bac3b6619e..a2a596eacfc 100644 --- a/spring-core/src/main/java/org/springframework/core/NestedExceptionUtils.java +++ b/spring-core/src/main/java/org/springframework/core/NestedExceptionUtils.java @@ -40,7 +40,7 @@ public abstract class NestedExceptionUtils { * @deprecated as of 6.0, in favor of custom exception messages * with selective inclusion of cause messages */ - @Deprecated + @Deprecated(since = "6.0") @Nullable public static String buildMessage(@Nullable String message, @Nullable Throwable cause) { if (cause == null) { diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java index 0a490703ead..a39ee3453e4 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java @@ -114,7 +114,7 @@ public interface DataBuffer { * @deprecated as of 6.0, in favor of {@link #ensureWritable(int)}, which * has different semantics */ - @Deprecated + @Deprecated(since = "6.0") DataBuffer capacity(int capacity); /** @@ -126,7 +126,7 @@ public interface DataBuffer { * @since 5.1.4 * @deprecated since 6.0, in favor of {@link #ensureWritable(int)} */ - @Deprecated + @Deprecated(since = "6.0") default DataBuffer ensureCapacity(int capacity) { return ensureWritable(capacity); } @@ -304,7 +304,7 @@ public interface DataBuffer { * @deprecated as of 6.0, in favor of {@link #split(int)}, which * has different semantics */ - @Deprecated + @Deprecated(since = "6.0") DataBuffer slice(int index, int length); /** @@ -322,7 +322,7 @@ public interface DataBuffer { * @deprecated as of 6.0, in favor of {@link #split(int)}, which * has different semantics */ - @Deprecated + @Deprecated(since = "6.0") default DataBuffer retainedSlice(int index, int length) { return DataBufferUtils.retain(slice(index, length)); } @@ -356,7 +356,7 @@ public interface DataBuffer { * @deprecated as of 6.0, in favor of {@link #toByteBuffer()}, which does * not share data and returns a copy. */ - @Deprecated + @Deprecated(since = "6.0") ByteBuffer asByteBuffer(); /** @@ -371,7 +371,7 @@ public interface DataBuffer { * @deprecated as of 6.0, in favor of {@link #toByteBuffer(int, int)}, which * does not share data and returns a copy. */ - @Deprecated + @Deprecated(since = "6.0") ByteBuffer asByteBuffer(int index, int length); /** diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java index 865c1737396..dfe95fbd2bb 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferFactory.java @@ -36,7 +36,7 @@ public interface DataBufferFactory { * @return the allocated buffer * @deprecated as of 6.0, in favor of {@link #allocateBuffer(int)} */ - @Deprecated + @Deprecated(since = "6.0") DataBuffer allocateBuffer(); /** diff --git a/spring-core/src/main/java/org/springframework/core/io/support/SpringFactoriesLoader.java b/spring-core/src/main/java/org/springframework/core/io/support/SpringFactoriesLoader.java index 550f3c770f5..4c11fcbf0a6 100644 --- a/spring-core/src/main/java/org/springframework/core/io/support/SpringFactoriesLoader.java +++ b/spring-core/src/main/java/org/springframework/core/io/support/SpringFactoriesLoader.java @@ -270,7 +270,7 @@ public class SpringFactoriesLoader { * @see #loadFactories * @deprecated as of 6.0 in favor of {@link #load(Class, ArgumentResolver, FailureHandler)} */ - @Deprecated + @Deprecated(since = "6.0") public static List loadFactoryNames(Class factoryType, @Nullable ClassLoader classLoader) { return forDefaultResourceLocation(classLoader).loadFactoryNames(factoryType); } diff --git a/spring-core/src/main/java/org/springframework/core/task/AsyncListenableTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/AsyncListenableTaskExecutor.java index fe30699a1c6..854da24c4d4 100644 --- a/spring-core/src/main/java/org/springframework/core/task/AsyncListenableTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/AsyncListenableTaskExecutor.java @@ -31,7 +31,7 @@ import org.springframework.util.concurrent.ListenableFuture; * {@link AsyncTaskExecutor#submitCompletable(Runnable)} and * {@link AsyncTaskExecutor#submitCompletable(Callable)} */ -@Deprecated +@Deprecated(since = "6.0") public interface AsyncListenableTaskExecutor extends AsyncTaskExecutor { /** diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrentLruCache.java b/spring-core/src/main/java/org/springframework/util/ConcurrentLruCache.java index f37fc5cc8f5..4104ccbf511 100644 --- a/spring-core/src/main/java/org/springframework/util/ConcurrentLruCache.java +++ b/spring-core/src/main/java/org/springframework/util/ConcurrentLruCache.java @@ -159,7 +159,7 @@ public final class ConcurrentLruCache { * Return the maximum number of entries in the cache. * @deprecated in favor of {@link #capacity()} as of 6.0. */ - @Deprecated + @Deprecated(since = "6.0") public int sizeLimit() { return this.capacity; } diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java index 30c115a0007..7fe9a46e9ff 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeType.java +++ b/spring-core/src/main/java/org/springframework/util/MimeType.java @@ -708,7 +708,7 @@ public class MimeType implements Comparable, Serializable { * @param the type of mime types that may be compared by this comparator * @deprecated As of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public static class SpecificityComparator implements Comparator { @Override diff --git a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java index d85370e281b..18b76795e93 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java +++ b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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. @@ -55,7 +55,7 @@ public abstract class MimeTypeUtils { * Comparator formally used by {@link #sortBySpecificity(List)}. * @deprecated As of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public static final Comparator SPECIFICITY_COMPARATOR = new MimeType.SpecificityComparator<>(); /** diff --git a/spring-core/src/main/java/org/springframework/util/StreamUtils.java b/spring-core/src/main/java/org/springframework/util/StreamUtils.java index a991ca37349..95368a137d9 100644 --- a/spring-core/src/main/java/org/springframework/util/StreamUtils.java +++ b/spring-core/src/main/java/org/springframework/util/StreamUtils.java @@ -215,7 +215,7 @@ public abstract class StreamUtils { * @since 4.2.2 * @deprecated as of 6.0 in favor of {@link InputStream#nullInputStream()} */ - @Deprecated + @Deprecated(since = "6.0") public static InputStream emptyInput() { return InputStream.nullInputStream(); } diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/CompletableToListenableFutureAdapter.java b/spring-core/src/main/java/org/springframework/util/concurrent/CompletableToListenableFutureAdapter.java index 48c3040d012..79ef15391e2 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/CompletableToListenableFutureAdapter.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/CompletableToListenableFutureAdapter.java @@ -32,7 +32,7 @@ import java.util.concurrent.TimeoutException; * @param the result type returned by this Future's {@code get} method * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public class CompletableToListenableFutureAdapter implements ListenableFuture { private final CompletableFuture completableFuture; diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java b/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java index 46d24546668..5dbc062ca23 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/FailureCallback.java @@ -26,7 +26,7 @@ import java.util.function.BiConsumer; * @deprecated as of 6.0, in favor of * {@link java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)} */ -@Deprecated +@Deprecated(since = "6.0") @FunctionalInterface public interface FailureCallback { diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/FutureAdapter.java b/spring-core/src/main/java/org/springframework/util/concurrent/FutureAdapter.java index 36fa75966c8..05d80e7c28f 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/FutureAdapter.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/FutureAdapter.java @@ -35,7 +35,7 @@ import org.springframework.util.Assert; * @param the type of the adaptee's {@code Future} * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public abstract class FutureAdapter implements Future { private final Future adaptee; diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFuture.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFuture.java index 3ca3f75e30e..9c0514b24b8 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFuture.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFuture.java @@ -34,7 +34,7 @@ import java.util.function.BiConsumer; * @param the result type returned by this Future's {@code get} method * @deprecated as of 6.0, in favor of {@link CompletableFuture} */ -@Deprecated +@Deprecated(since = "6.0") public interface ListenableFuture extends Future { /** @@ -43,7 +43,7 @@ public interface ListenableFuture extends Future { * @deprecated as of 6.0, in favor of * {@link CompletableFuture#whenComplete(BiConsumer)} */ - @Deprecated + @Deprecated(since = "6.0") void addCallback(ListenableFutureCallback callback); /** @@ -54,7 +54,7 @@ public interface ListenableFuture extends Future { * @deprecated as of 6.0, in favor of * {@link CompletableFuture#whenComplete(BiConsumer)} */ - @Deprecated + @Deprecated(since = "6.0") void addCallback(SuccessCallback successCallback, FailureCallback failureCallback); diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureAdapter.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureAdapter.java index a561e9971cd..a05e2436b0f 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureAdapter.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureAdapter.java @@ -34,7 +34,7 @@ import org.springframework.lang.Nullable; * @deprecated as of 6.0, in favor of * {@link java.util.concurrent.CompletableFuture} */ -@Deprecated +@Deprecated(since = "6.0") public abstract class ListenableFutureAdapter extends FutureAdapter implements ListenableFuture { /** diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallback.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallback.java index dd2bd668d3b..ad875f361d9 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallback.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallback.java @@ -29,7 +29,7 @@ import java.util.function.BiConsumer; * @deprecated as of 6.0, in favor of * {@link java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)} */ -@Deprecated +@Deprecated(since = "6.0") public interface ListenableFutureCallback extends SuccessCallback, FailureCallback { } diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java index 6e00b26136f..9c5093a2964 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java @@ -35,7 +35,7 @@ import org.springframework.util.Assert; * @param the callback result type * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public class ListenableFutureCallbackRegistry { private final Queue> successCallbacks = new ArrayDeque<>(1); diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java index a7e08640e1a..b0bc7b6c1c6 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureTask.java @@ -31,7 +31,7 @@ import org.springframework.lang.Nullable; * @param the result type returned by this Future's {@code get} method * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public class ListenableFutureTask extends FutureTask implements ListenableFuture { private final ListenableFutureCallbackRegistry callbacks = new ListenableFutureCallbackRegistry<>(); diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/MonoToListenableFutureAdapter.java b/spring-core/src/main/java/org/springframework/util/concurrent/MonoToListenableFutureAdapter.java index 12bacc0efc2..df3f0df5052 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/MonoToListenableFutureAdapter.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/MonoToListenableFutureAdapter.java @@ -29,7 +29,7 @@ import reactor.core.publisher.Mono; * @param the object type * @deprecated as of 6.0, in favor of {@link Mono#toFuture()} */ -@Deprecated +@Deprecated(since = "6.0") public class MonoToListenableFutureAdapter extends CompletableToListenableFutureAdapter { public MonoToListenableFutureAdapter(Mono mono) { diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java b/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java index 2a6f0b5bfac..7f33ff28394 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java @@ -38,7 +38,7 @@ import org.springframework.util.Assert; * @param the result type returned by this Future's {@code get} method * @deprecated as of 6.0, in favor of {@link CompletableFuture} */ -@Deprecated +@Deprecated(since = "6.0") public class SettableListenableFuture implements ListenableFuture { private static final Callable DUMMY_CALLABLE = () -> { diff --git a/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java b/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java index 0e8244e24ac..2e6a6af322a 100644 --- a/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java +++ b/spring-core/src/main/java/org/springframework/util/concurrent/SuccessCallback.java @@ -29,7 +29,7 @@ import org.springframework.lang.Nullable; * @deprecated as of 6.0, in favor of * {@link java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)} */ -@Deprecated +@Deprecated(since = "6.0") @FunctionalInterface public interface SuccessCallback { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AsyncHandlerMethodReturnValueHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AsyncHandlerMethodReturnValueHandler.java index 02ff58ed56b..311969d82c6 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AsyncHandlerMethodReturnValueHandler.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AsyncHandlerMethodReturnValueHandler.java @@ -67,7 +67,7 @@ public interface AsyncHandlerMethodReturnValueHandler extends HandlerMethodRetur * @deprecated as of 6.0, in favor of * {@link #toCompletableFuture(Object, MethodParameter)} */ - @Deprecated + @Deprecated(since = "6.0") @Nullable default org.springframework.util.concurrent.ListenableFuture toListenableFuture( Object returnValue, MethodParameter returnType) { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/ListenableFutureReturnValueHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/ListenableFutureReturnValueHandler.java index fa39e86a4db..f2b6c1cf956 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/ListenableFutureReturnValueHandler.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/ListenableFutureReturnValueHandler.java @@ -28,7 +28,7 @@ import org.springframework.util.concurrent.ListenableFuture; * @since 4.2 * @deprecated as of 6.0, in favor of {@link CompletableFutureReturnValueHandler} */ -@Deprecated +@Deprecated(since = "6.0") public class ListenableFutureReturnValueHandler extends AbstractAsyncReturnValueHandler { @Override diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ConnectionHandlingStompSession.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ConnectionHandlingStompSession.java index 750a37d52bb..947b640c2f8 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ConnectionHandlingStompSession.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ConnectionHandlingStompSession.java @@ -35,7 +35,7 @@ public interface ConnectionHandlingStompSession extends StompSession, StompTcpCo * Return a future that will complete when the session is ready for use. * @deprecated as of 6.0, in favor of {@link #getSession()} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture getSessionFuture() { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( getSession()); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ReactorNettyTcpStompClient.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ReactorNettyTcpStompClient.java index 7d9cfe67a95..5ee2bb2d65b 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ReactorNettyTcpStompClient.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/ReactorNettyTcpStompClient.java @@ -96,7 +96,7 @@ public class ReactorNettyTcpStompClient extends StompClientSupport { * @return a ListenableFuture for access to the session when ready for use * @deprecated as of 6.0, in favor of {@link #connectAsync(StompSessionHandler)} */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.util.concurrent.ListenableFuture connect( StompSessionHandler handler) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( @@ -122,7 +122,7 @@ public class ReactorNettyTcpStompClient extends StompClientSupport { * @return a ListenableFuture for access to the session when ready for use * @deprecated as of 6.0, in favor of {@link #connectAsync(StompHeaders, StompSessionHandler)} */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.util.concurrent.ListenableFuture connect( @Nullable StompHeaders connectHeaders, StompSessionHandler handler) { ConnectionHandlingStompSession session = createSession(connectHeaders, handler); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java index 39790adf238..d6eda9dbb97 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java @@ -37,7 +37,7 @@ public interface TcpConnection

extends Closeable { * message was successfully sent * @deprecated as of 6.0, in favor of {@link #sendAsync(Message)} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture send(Message

message) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( sendAsync(message)); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpOperations.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpOperations.java index ddbaa3bd01e..4a4849d177c 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpOperations.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpOperations.java @@ -34,7 +34,7 @@ public interface TcpOperations

{ * connection is successfully established * @deprecated as of 6.0, in favor of {@link #connectAsync(TcpConnectionHandler)} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture connect( TcpConnectionHandler

connectionHandler) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( @@ -58,7 +58,7 @@ public interface TcpOperations

{ * initial connection is successfully established * @deprecated as of 6.0, in favor of {@link #connectAsync(TcpConnectionHandler, ReconnectStrategy)} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture connect( TcpConnectionHandler

connectionHandler, ReconnectStrategy reconnectStrategy) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( @@ -81,7 +81,7 @@ public interface TcpOperations

{ * connection is successfully closed * @deprecated as of 6.0, in favor of {@link #shutdownAsync()} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture shutdown() { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( shutdownAsync()); diff --git a/spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java b/spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java index ea22ca09621..65de69096d7 100644 --- a/spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java @@ -240,7 +240,7 @@ public final class MockServerHttpRequest extends AbstractServerHttpRequest { * @since 5.2.7 * @deprecated as of Spring Framework 6.0 in favor of {@link #method(HttpMethod, String, Object...)} */ - @Deprecated + @Deprecated(since = "6.0") public static BodyBuilder method(String httpMethod, String uri, Object... vars) { Assert.isTrue(StringUtils.hasText(httpMethod), "HTTP method is required."); return new DefaultBodyBuilder(HttpMethod.valueOf(httpMethod), toUri(uri, vars)); diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java index 7123a762447..3ed1903632d 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java @@ -57,7 +57,7 @@ public interface ContextLoader { * @deprecated as of Spring Framework 6.0, in favor of methods defined in the * {@link SmartContextLoader} SPI */ - @Deprecated + @Deprecated(since = "6.0") String[] processLocations(Class clazz, String... locations); /** @@ -84,7 +84,7 @@ public interface ContextLoader { * @deprecated as of Spring Framework 6.0, in favor of methods defined in the * {@link SmartContextLoader} SPI */ - @Deprecated + @Deprecated(since = "6.0") ApplicationContext loadContext(String... locations) throws Exception; } diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java index 68f38553e76..48c68ae013c 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java @@ -256,7 +256,7 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader * @see #loadContext(MergedContextConfiguration) * @deprecated as of Spring Framework 6.0, in favor of {@link #loadContext(MergedContextConfiguration)} */ - @Deprecated + @Deprecated(since = "6.0") @Override public final ConfigurableApplicationContext loadContext(String... locations) throws Exception { if (logger.isDebugEnabled()) { diff --git a/spring-test/src/main/java/org/springframework/test/web/reactive/server/ExchangeResult.java b/spring-test/src/main/java/org/springframework/test/web/reactive/server/ExchangeResult.java index 8d3470ec357..c39e13ae78c 100644 --- a/spring-test/src/main/java/org/springframework/test/web/reactive/server/ExchangeResult.java +++ b/spring-test/src/main/java/org/springframework/test/web/reactive/server/ExchangeResult.java @@ -181,7 +181,7 @@ public class ExchangeResult { * @since 5.1.10 * @deprecated as of 6.0, in favor of {@link #getStatus()} */ - @Deprecated + @Deprecated(since = "6.0") public int getRawStatusCode() { return this.response.getRawStatusCode(); } diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcWebTestClient.java b/spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcWebTestClient.java index 9aa03935f91..4a58df0c0c4 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcWebTestClient.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/client/MockMvcWebTestClient.java @@ -361,7 +361,7 @@ public interface MockMvcWebTestClient { * @deprecated as of 6.0, see * {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)} */ - @Deprecated + @Deprecated(since = "6.0") ControllerSpec useTrailingSlashPatternMatch(boolean useTrailingSlashPatternMatch); /** diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java b/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java index 342035f010f..2671c5217e1 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java @@ -345,7 +345,7 @@ public class StandaloneMockMvcBuilder extends AbstractMockMvcBuilder, InitializingBean { private final JtaTransactionManager transactionManager = new JtaTransactionManager(); diff --git a/spring-web/src/main/java/org/springframework/http/HttpRequest.java b/spring-web/src/main/java/org/springframework/http/HttpRequest.java index 643f3ca365c..ae151890128 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/HttpRequest.java @@ -42,7 +42,7 @@ public interface HttpRequest extends HttpMessage { * @deprecated as of Spring Framework 6.0 in favor of {@link #getMethod()} and * {@link HttpMethod#name()} */ - @Deprecated + @Deprecated(since = "6.0") String getMethodValue(); /** diff --git a/spring-web/src/main/java/org/springframework/http/MediaType.java b/spring-web/src/main/java/org/springframework/http/MediaType.java index 4a8b625dc32..102dafc1f94 100644 --- a/spring-web/src/main/java/org/springframework/http/MediaType.java +++ b/spring-web/src/main/java/org/springframework/http/MediaType.java @@ -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. @@ -823,7 +823,7 @@ public class MediaType extends MimeType implements Serializable { * @param mediaTypes the list of media types to be sorted * @deprecated As of 6.0, in favor of {@link MimeTypeUtils#sortBySpecificity(List)} */ - @Deprecated + @Deprecated(since = "6.0") public static void sortBySpecificity(List mediaTypes) { Assert.notNull(mediaTypes, "'mediaTypes' must not be null"); if (mediaTypes.size() > 1) { @@ -852,7 +852,7 @@ public class MediaType extends MimeType implements Serializable { * @see #getQualityValue() * @deprecated As of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public static void sortByQualityValue(List mediaTypes) { Assert.notNull(mediaTypes, "'mediaTypes' must not be null"); if (mediaTypes.size() > 1) { @@ -865,7 +865,7 @@ public class MediaType extends MimeType implements Serializable { * primary criteria and quality value the secondary. * @deprecated As of 6.0, in favor of {@link MimeTypeUtils#sortBySpecificity(List)} */ - @Deprecated + @Deprecated(since = "6.0") public static void sortBySpecificityAndQuality(List mediaTypes) { Assert.notNull(mediaTypes, "'mediaTypes' must not be null"); if (mediaTypes.size() > 1) { @@ -878,7 +878,7 @@ public class MediaType extends MimeType implements Serializable { * Comparator used by {@link #sortByQualityValue(List)}. * @deprecated As of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public static final Comparator QUALITY_VALUE_COMPARATOR = (mediaType1, mediaType2) -> { double quality1 = mediaType1.getQualityValue(); double quality2 = mediaType2.getQualityValue(); @@ -918,7 +918,7 @@ public class MediaType extends MimeType implements Serializable { * Comparator used by {@link #sortBySpecificity(List)}. * @deprecated As of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public static final Comparator SPECIFICITY_COMPARATOR = new SpecificityComparator<>() { @Override diff --git a/spring-web/src/main/java/org/springframework/http/ResponseEntity.java b/spring-web/src/main/java/org/springframework/http/ResponseEntity.java index 216760cb8ac..dd3899adfc6 100644 --- a/spring-web/src/main/java/org/springframework/http/ResponseEntity.java +++ b/spring-web/src/main/java/org/springframework/http/ResponseEntity.java @@ -157,7 +157,7 @@ public class ResponseEntity extends HttpEntity { * @since 4.3 * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ - @Deprecated + @Deprecated(since = "6.0") public int getStatusCodeValue() { if (this.status instanceof HttpStatusCode statusCode) { return statusCode.value(); diff --git a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java index d4bc6432ed9..db9e5d19617 100644 --- a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java @@ -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. @@ -27,7 +27,7 @@ import org.springframework.http.HttpStatusCode; * @since 3.1.1 * @deprecated as of 6.0, with no direct replacement */ -@Deprecated +@Deprecated(since = "6.0") public abstract class AbstractClientHttpResponse implements ClientHttpResponse { @Override diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java index 0da42bbe90f..ab4001df32a 100644 --- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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. @@ -50,7 +50,7 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable { * @see #getStatusCode() * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ - @Deprecated + @Deprecated(since = "6.0") int getRawStatusCode() throws IOException; /** diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/ClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/reactive/ClientHttpResponse.java index 18acaf00d9b..41b109a3249 100644 --- a/spring-web/src/main/java/org/springframework/http/client/reactive/ClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/reactive/ClientHttpResponse.java @@ -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. @@ -53,7 +53,7 @@ public interface ClientHttpResponse extends ReactiveHttpInputMessage { * @see #getStatusCode() * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ - @Deprecated + @Deprecated(since = "6.0") int getRawStatusCode(); /** diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponse.java b/spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponse.java index 2879e1e486a..d2609626f3d 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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. @@ -68,7 +68,7 @@ public interface ServerHttpResponse extends ReactiveHttpOutputMessage { * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ @Nullable - @Deprecated + @Deprecated(since = "6.0") default Integer getRawStatusCode() { HttpStatusCode httpStatus = getStatusCode(); return (httpStatus != null ? httpStatus.value() : null); diff --git a/spring-web/src/main/java/org/springframework/web/client/RestClientResponseException.java b/spring-web/src/main/java/org/springframework/web/client/RestClientResponseException.java index d74e4e22799..959705c4373 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestClientResponseException.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestClientResponseException.java @@ -107,7 +107,7 @@ public class RestClientResponseException extends RestClientException { * Return the raw HTTP status code value. * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ - @Deprecated + @Deprecated(since = "6.0") public int getRawStatusCode() { return this.statusCode.value(); } diff --git a/spring-web/src/main/java/org/springframework/web/client/UnknownContentTypeException.java b/spring-web/src/main/java/org/springframework/web/client/UnknownContentTypeException.java index 99fc367686a..cfbd27d68bd 100644 --- a/spring-web/src/main/java/org/springframework/web/client/UnknownContentTypeException.java +++ b/spring-web/src/main/java/org/springframework/web/client/UnknownContentTypeException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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. @@ -115,7 +115,7 @@ public class UnknownContentTypeException extends RestClientException { * Return the raw HTTP status code value. * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ - @Deprecated + @Deprecated(since = "6.0") public int getRawStatusCode() { return this.statusCode.value(); } diff --git a/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java b/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java index a9a3c94dd6c..344a2c267c6 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java @@ -87,7 +87,7 @@ public class ModelAndViewContainer { * @deprecated as of 6.0 without a replacement; once removed, the default * model will always be ignored on redirect */ - @Deprecated + @Deprecated(since = "6.0") public void setIgnoreDefaultModelOnRedirect(boolean ignoreDefaultModelOnRedirect) { this.ignoreDefaultModelOnRedirect = ignoreDefaultModelOnRedirect; } diff --git a/spring-web/src/main/java/org/springframework/web/server/MethodNotAllowedException.java b/spring-web/src/main/java/org/springframework/web/server/MethodNotAllowedException.java index f152b1dd70e..a8622953e32 100644 --- a/spring-web/src/main/java/org/springframework/web/server/MethodNotAllowedException.java +++ b/spring-web/src/main/java/org/springframework/web/server/MethodNotAllowedException.java @@ -81,7 +81,7 @@ public class MethodNotAllowedException extends ResponseStatusException { * @since 5.1.13 * @deprecated as of 6.0 in favor of {@link #getHeaders()} */ - @Deprecated + @Deprecated(since = "6.0") @Override public HttpHeaders getResponseHeaders() { return getHeaders(); diff --git a/spring-web/src/main/java/org/springframework/web/server/NotAcceptableStatusException.java b/spring-web/src/main/java/org/springframework/web/server/NotAcceptableStatusException.java index 212ab3e73f5..c81d7e49ace 100644 --- a/spring-web/src/main/java/org/springframework/web/server/NotAcceptableStatusException.java +++ b/spring-web/src/main/java/org/springframework/web/server/NotAcceptableStatusException.java @@ -76,7 +76,7 @@ public class NotAcceptableStatusException extends ResponseStatusException { * @since 5.1.13 * @deprecated as of 6.0 in favor of {@link #getHeaders()} */ - @Deprecated + @Deprecated(since = "6.0") @Override public HttpHeaders getResponseHeaders() { return getHeaders(); diff --git a/spring-web/src/main/java/org/springframework/web/server/ResponseStatusException.java b/spring-web/src/main/java/org/springframework/web/server/ResponseStatusException.java index 143a6613fb2..2ca89361953 100644 --- a/spring-web/src/main/java/org/springframework/web/server/ResponseStatusException.java +++ b/spring-web/src/main/java/org/springframework/web/server/ResponseStatusException.java @@ -104,7 +104,7 @@ public class ResponseStatusException extends ErrorResponseException { * @since 5.1.13 * @deprecated as of 6.0 in favor of {@link #getHeaders()} */ - @Deprecated + @Deprecated(since = "6.0") public HttpHeaders getResponseHeaders() { return HttpHeaders.EMPTY; } diff --git a/spring-web/src/main/java/org/springframework/web/server/UnsupportedMediaTypeStatusException.java b/spring-web/src/main/java/org/springframework/web/server/UnsupportedMediaTypeStatusException.java index c39ef1678b4..dc1db9fac77 100644 --- a/spring-web/src/main/java/org/springframework/web/server/UnsupportedMediaTypeStatusException.java +++ b/spring-web/src/main/java/org/springframework/web/server/UnsupportedMediaTypeStatusException.java @@ -155,7 +155,7 @@ public class UnsupportedMediaTypeStatusException extends ResponseStatusException * Delegates to {@link #getHeaders()}. * @deprecated as of 6.0 in favor of {@link #getHeaders()} */ - @Deprecated + @Deprecated(since = "6.0") @Override public HttpHeaders getResponseHeaders() { return getHeaders(); diff --git a/spring-web/src/main/java/org/springframework/web/server/handler/ResponseStatusExceptionHandler.java b/spring-web/src/main/java/org/springframework/web/server/handler/ResponseStatusExceptionHandler.java index b155f911291..cf1337781d5 100644 --- a/spring-web/src/main/java/org/springframework/web/server/handler/ResponseStatusExceptionHandler.java +++ b/spring-web/src/main/java/org/springframework/web/server/handler/ResponseStatusExceptionHandler.java @@ -134,7 +134,7 @@ public class ResponseStatusExceptionHandler implements WebExceptionHandler { * @since 5.3 * @deprecated as of 6.0, in favor of {@link #determineStatus(Throwable)} */ - @Deprecated + @Deprecated(since = "6.0") protected int determineRawStatusCode(Throwable ex) { if (ex instanceof ResponseStatusException responseStatusException) { return responseStatusException.getStatusCode().value(); diff --git a/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java b/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java index 6cd94895063..b537d9b39b7 100644 --- a/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java +++ b/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java @@ -41,7 +41,7 @@ import org.springframework.lang.Nullable; * @see org.springframework.core.NestedRuntimeException * @deprecated as of 6.0, in favor of standard {@link ServletException} nesting */ -@Deprecated +@Deprecated(since = "6.0") public class NestedServletException extends ServletException { /** Use serialVersionUID from Spring 1.2 for interoperability. */ diff --git a/spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java b/spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java index 22e24bede75..9bac52b388e 100644 --- a/spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java +++ b/spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java @@ -54,7 +54,7 @@ public class PathPatternParser { * 6.0 in favor of configuring explicit redirects through a proxy, * Servlet/web filter, or a controller. */ - @Deprecated + @Deprecated(since = "6.0") public void setMatchOptionalTrailingSeparator(boolean matchOptionalTrailingSeparator) { this.matchOptionalTrailingSeparator = matchOptionalTrailingSeparator; } @@ -63,7 +63,7 @@ public class PathPatternParser { * Whether optional trailing slashing match is enabled. * @deprecated as of 6.0 together with {@link #setMatchOptionalTrailingSeparator(boolean)}. */ - @Deprecated + @Deprecated(since = "6.0") public boolean isMatchOptionalTrailingSeparator() { return this.matchOptionalTrailingSeparator; } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/config/PathMatchConfigurer.java b/spring-webflux/src/main/java/org/springframework/web/reactive/config/PathMatchConfigurer.java index ec83d837c63..66e09b069b3 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/config/PathMatchConfigurer.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/config/PathMatchConfigurer.java @@ -61,7 +61,7 @@ public class PathMatchConfigurer { * @deprecated as of 6.0, see * {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)} */ - @Deprecated + @Deprecated(since = "6.0") public PathMatchConfigurer setUseTrailingSlashMatch(Boolean trailingSlashMatch) { this.trailingSlashMatch = trailingSlashMatch; return this; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java index 508c16c98bb..85c3e2f04a1 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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. @@ -63,7 +63,7 @@ public interface ClientResponse { * @since 5.1 * @deprecated as of 6.0, in favor of {@link #statusCode()} */ - @Deprecated + @Deprecated(since = "6.0") int rawStatusCode(); /** diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java index f09d6d8edf8..1a23b22e9b4 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java @@ -174,7 +174,7 @@ public class WebClientResponseException extends WebClientException { * Return the raw HTTP status code value. * @deprecated as of 6.0, in favor of {@link #getStatusCode()} */ - @Deprecated + @Deprecated(since = "6.0") public int getRawStatusCode() { return this.statusCode.value(); } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java index e956210e463..6f0b268a163 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java @@ -75,7 +75,7 @@ public interface ServerRequest { * @return the HTTP method as a String * @deprecated as of 6.0, in favor of {@link #method()} */ - @Deprecated + @Deprecated(since = "6.0") String methodName(); /** diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java index 35b3197990e..9c0757a6cd5 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 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. @@ -71,7 +71,7 @@ public interface ServerResponse { * @since 5.2 * @deprecated as of 6.0, in favor of {@link #statusCode()} */ - @Deprecated + @Deprecated(since = "6.0") int rawStatusCode(); /** diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java index fc545db3048..55788fa304a 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java @@ -98,7 +98,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport * @deprecated as of 6.0, see * {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)} */ - @Deprecated + @Deprecated(since = "6.0") public void setUseTrailingSlashMatch(boolean trailingSlashMatch) { this.patternParser.setMatchOptionalTrailingSeparator(trailingSlashMatch); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java index 3c13137287e..c3b2eff1a50 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 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. @@ -47,7 +47,7 @@ import org.springframework.lang.Nullable; * @see org.springframework.ui.context.ThemeSource * @deprecated as of 6.0, with no direct replacement */ -@Deprecated +@Deprecated(since = "6.0") public interface ThemeResolver { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.java index c3a57502dc7..9d08eae0754 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.java @@ -111,7 +111,7 @@ public class PathMatchConfigurer { * @deprecated as of 6.0, see * {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)} */ - @Deprecated + @Deprecated(since = "6.0") public PathMatchConfigurer setUseTrailingSlashMatch(Boolean trailingSlashMatch) { this.trailingSlashMatch = trailingSlashMatch; return this; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java index 22fc2dbafb2..026e0814cf1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 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. @@ -70,7 +70,7 @@ public interface ServerResponse { * @return the status as an integer * @deprecated as of 6.0, in favor of {@link #statusCode()} */ - @Deprecated + @Deprecated(since = "6.0") int rawStatusCode(); /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java index 934c4c09df8..f19737c996f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java @@ -181,7 +181,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport * @see org.springframework.web.util.UrlPathHelper#setAlwaysUseFullPath(boolean) * @deprecated as of 6.0, in favor of using {@link #setUrlPathHelper(UrlPathHelper)} */ - @Deprecated + @Deprecated(since = "6.0") public void setAlwaysUseFullPath(boolean alwaysUseFullPath) { this.urlPathHelper.setAlwaysUseFullPath(alwaysUseFullPath); if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource urlConfigSource) { @@ -196,7 +196,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport * @see org.springframework.web.util.UrlPathHelper#setUrlDecode(boolean) * @deprecated as of 6.0, in favor of using {@link #setUrlPathHelper(UrlPathHelper)} */ - @Deprecated + @Deprecated(since = "6.0") public void setUrlDecode(boolean urlDecode) { this.urlPathHelper.setUrlDecode(urlDecode); if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource urlConfigSource) { @@ -211,7 +211,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport * @see org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean) * @deprecated as of 6.0, in favor of using {@link #setUrlPathHelper(UrlPathHelper)} */ - @Deprecated + @Deprecated(since = "6.0") public void setRemoveSemicolonContent(boolean removeSemicolonContent) { this.urlPathHelper.setRemoveSemicolonContent(removeSemicolonContent); if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource urlConfigSource) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java index 4f4c790aa29..4c7009f1bb2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java @@ -108,7 +108,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping i * @deprecated as of 6.0, see * {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)} */ - @Deprecated + @Deprecated(since = "6.0") public void setUseTrailingSlashMatch(boolean useTrailingSlashMatch) { this.useTrailingSlashMatch = useTrailingSlashMatch; if (getPatternParser() != null) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java index 0572bc70b7a..58fb0ec3c03 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java @@ -377,7 +377,7 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleConte * @see jakarta.servlet.http.HttpServletRequest#getLocale() * @deprecated as of 6.0, in favor of {@link #setDefaultLocaleFunction(Function)} */ - @Deprecated + @Deprecated(since = "6.0") protected Locale determineDefaultLocale(HttpServletRequest request) { return this.defaultLocaleFunction.apply(request); } @@ -392,7 +392,7 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleConte * @see #setDefaultTimeZone * @deprecated as of 6.0, in favor of {@link #setDefaultTimeZoneFunction(Function)} */ - @Deprecated + @Deprecated(since = "6.0") @Nullable protected TimeZone determineDefaultTimeZone(HttpServletRequest request) { return this.defaultTimeZoneFunction.apply(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java index 67a19fea944..3c4e70465f2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java @@ -208,7 +208,7 @@ public class SessionLocaleResolver extends AbstractLocaleContextResolver { * @see jakarta.servlet.http.HttpServletRequest#getLocale() * @deprecated as of 6.0, in favor of {@link #setDefaultLocaleFunction(Function)} */ - @Deprecated + @Deprecated(since = "6.0") protected Locale determineDefaultLocale(HttpServletRequest request) { return this.defaultLocaleFunction.apply(request); } @@ -223,7 +223,7 @@ public class SessionLocaleResolver extends AbstractLocaleContextResolver { * @see #setDefaultTimeZone * @deprecated as of 6.0, in favor of {@link #setDefaultTimeZoneFunction(Function)} */ - @Deprecated + @Deprecated(since = "6.0") @Nullable protected TimeZone determineDefaultTimeZone(HttpServletRequest request) { return this.defaultTimeZoneFunction.apply(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java index 9b6262b5122..916d8e093b0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java @@ -954,7 +954,7 @@ public final class RequestMappingInfo implements RequestConditionResolved lazily for more efficiency when theme support is not being used. * @deprecated as of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.ui.context.Theme getTheme() { if (this.theme == null) { // Lazily determine theme to use for this RequestContext. @@ -431,7 +431,7 @@ public class RequestContext { * @see org.springframework.web.servlet.ThemeResolver#setThemeName * @deprecated as of 6.0, with no direct replacement */ - @Deprecated + @Deprecated(since = "6.0") public void changeTheme(@Nullable org.springframework.ui.context.Theme theme) { org.springframework.web.servlet.ThemeResolver themeResolver = RequestContextUtils.getThemeResolver(this.request); if (themeResolver == null) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java index b77ed1b3db2..7f438a03b09 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java @@ -185,7 +185,7 @@ public abstract class RequestContextUtils { * @deprecated as of 6.0, with no direct replacement */ @Nullable - @Deprecated + @Deprecated(since = "6.0") public static org.springframework.web.servlet.ThemeResolver getThemeResolver(HttpServletRequest request) { return (org.springframework.web.servlet.ThemeResolver) request.getAttribute(DispatcherServlet.THEME_RESOLVER_ATTRIBUTE); } @@ -198,7 +198,7 @@ public abstract class RequestContextUtils { * @deprecated as of 6.0, with no direct replacement */ @Nullable - @Deprecated + @Deprecated(since = "6.0") public static org.springframework.ui.context.ThemeSource getThemeSource(HttpServletRequest request) { return (org.springframework.ui.context.ThemeSource) request.getAttribute(DispatcherServlet.THEME_SOURCE_ATTRIBUTE); } @@ -212,7 +212,7 @@ public abstract class RequestContextUtils { * @deprecated as of 6.0, with no direct replacement */ @Nullable - @Deprecated + @Deprecated(since = "6.0") public static org.springframework.ui.context.Theme getTheme(HttpServletRequest request) { org.springframework.web.servlet.ThemeResolver themeResolver = getThemeResolver(request); org.springframework.ui.context.ThemeSource themeSource = getThemeSource(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ThemeTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ThemeTag.java index c8e38e545c4..c13da2386e7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ThemeTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ThemeTag.java @@ -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. @@ -125,7 +125,7 @@ import org.springframework.context.NoSuchMessageException; * @deprecated as of 6.0, with no direct replacement */ @SuppressWarnings("serial") -@Deprecated +@Deprecated(since = "6.0") public class ThemeTag extends MessageTag { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/AbstractThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/AbstractThemeResolver.java index 233c9a1ce58..79e8d536a6b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/AbstractThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/AbstractThemeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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. @@ -27,7 +27,7 @@ import org.springframework.web.servlet.ThemeResolver; * @since 17.06.2003 * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public abstract class AbstractThemeResolver implements ThemeResolver { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java index c811f14508d..2d796711ea8 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java @@ -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. @@ -41,7 +41,7 @@ import org.springframework.web.util.WebUtils; * @see #setThemeName * @deprecated as of 6.0, with no direct replacement */ -@Deprecated +@Deprecated(since = "6.0") public class CookieThemeResolver extends CookieGenerator implements ThemeResolver { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java index 31c0b3bdcf2..64d1a6bf3a6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 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. @@ -35,7 +35,7 @@ import org.springframework.lang.Nullable; * @see #setDefaultThemeName * @deprecated as of 6.0, with no direct replacement */ -@Deprecated +@Deprecated(since = "6.0") public class FixedThemeResolver extends AbstractThemeResolver { @Override diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java index ccaea29c88e..9a99cbd7cf6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 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. @@ -38,7 +38,7 @@ import org.springframework.web.util.WebUtils; * @see #setThemeName * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public class SessionThemeResolver extends AbstractThemeResolver { /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/ThemeChangeInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/ThemeChangeInterceptor.java index 39d9ef2b978..97d6d5984bd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/ThemeChangeInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/ThemeChangeInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 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.web.servlet.support.RequestContextUtils; * @see org.springframework.web.servlet.ThemeResolver * @deprecated as of 6.0, with no concrete replacement */ -@Deprecated +@Deprecated(since = "6.0") public class ThemeChangeInterceptor implements HandlerInterceptor { /** diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java index 1c5be1a51af..5a15fd0eb94 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java @@ -117,7 +117,7 @@ public abstract class AbstractWebSocketClient implements WebSocketClient { * @return the established WebSocket session wrapped in a {@code ListenableFuture}. * @deprecated as of 6.0, in favor of {@link #executeInternal(WebSocketHandler, HttpHeaders, URI, List, List, Map)} */ - @Deprecated + @Deprecated(since = "6.0") protected org.springframework.util.concurrent.ListenableFuture doHandshakeInternal( WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List subProtocols, List extensions, Map attributes) { diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java index 1efd7688c10..82810b2d7d3 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java @@ -44,7 +44,7 @@ public interface WebSocketClient { * @return a future that completes when the session is available * @deprecated as of 6.0, in favor of {@link #execute(WebSocketHandler, String, Object...)} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture doHandshake( WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( @@ -71,7 +71,7 @@ public interface WebSocketClient { * @return a future that completes when the session is available * @deprecated as of 6.0, in favor of {@link #execute(WebSocketHandler, WebSocketHttpHeaders, URI)} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture doHandshake( WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, URI uri) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java index db02dbefdf4..4a53f6e04bf 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java @@ -211,7 +211,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif * @return a {@code ListenableFuture} for access to the session when ready for use * @deprecated as of 6.0, in favor of {@link #connectAsync(String, StompSessionHandler, Object...)} */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.util.concurrent.ListenableFuture connect( String url, StompSessionHandler handler, Object... uriVars) { @@ -244,7 +244,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif * @return a {@code ListenableFuture} for access to the session when ready for use * @deprecated as of 6.0, in favor of {@link #connectAsync(String, WebSocketHttpHeaders, StompSessionHandler, Object...)} */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.util.concurrent.ListenableFuture connect( String url, @Nullable WebSocketHttpHeaders handshakeHeaders, StompSessionHandler handler, Object... uriVariables) { @@ -283,7 +283,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif * @return a {@code ListenableFuture} for access to the session when ready for use * @deprecated as of 6.0, in favor of {@link #connectAsync(String, WebSocketHttpHeaders, StompHeaders, StompSessionHandler, Object...)} */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.util.concurrent.ListenableFuture connect( String url, @Nullable WebSocketHttpHeaders handshakeHeaders, @Nullable StompHeaders connectHeaders, StompSessionHandler handler, Object... uriVariables) { @@ -324,7 +324,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif * @return a {@code ListenableFuture} for access to the session when ready for use * @deprecated as of 6.0, in favor of {@link #connectAsync(URI, WebSocketHttpHeaders, StompHeaders, StompSessionHandler)} */ - @Deprecated + @Deprecated(since = "6.0") public org.springframework.util.concurrent.ListenableFuture connect( URI url, @Nullable WebSocketHttpHeaders handshakeHeaders, @Nullable StompHeaders connectHeaders, StompSessionHandler sessionHandler) { diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java index 0b8c3d3d841..1f78b132d5e 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java @@ -71,7 +71,7 @@ public abstract class AbstractClientSockJsSession implements WebSocketSession { * Create a new {@code AbstractClientSockJsSession}. * @deprecated as of 6.0, in favor of {@link #AbstractClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)} */ - @Deprecated + @Deprecated(since = "6.0") protected AbstractClientSockJsSession(TransportRequest request, WebSocketHandler handler, org.springframework.util.concurrent.SettableListenableFuture connectFuture) { this(request, handler, connectFuture.completable()); diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java index ee05bc4dc16..91b3fde6b29 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java @@ -45,7 +45,7 @@ public interface Transport { * @return a future to indicate success or failure to connect * @deprecated as of 6.0, in favor of {@link #connectAsync(TransportRequest, WebSocketHandler)} */ - @Deprecated + @Deprecated(since = "6.0") default org.springframework.util.concurrent.ListenableFuture connect( TransportRequest request, WebSocketHandler webSocketHandler) { return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>( diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java index 3b16472d1ba..e5ff91bc1ca 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java @@ -46,7 +46,7 @@ public class WebSocketClientSockJsSession extends AbstractClientSockJsSession im * Create a new {@code WebSocketClientSockJsSession}. * @deprecated as of 6.0, in favor of {@link #WebSocketClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)} */ - @Deprecated + @Deprecated(since = "6.0") public WebSocketClientSockJsSession(TransportRequest request, WebSocketHandler handler, org.springframework.util.concurrent.SettableListenableFuture connectFuture) { diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java index 5787f360132..cb201260233 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java @@ -58,7 +58,7 @@ public class XhrClientSockJsSession extends AbstractClientSockJsSession { * @deprecated as of 6.0, in favor of * {@link #XhrClientSockJsSession(TransportRequest, WebSocketHandler, XhrTransport, CompletableFuture)} */ - @Deprecated + @Deprecated(since = "6.0") public XhrClientSockJsSession( TransportRequest request, WebSocketHandler handler, XhrTransport transport, org.springframework.util.concurrent.SettableListenableFuture connectFuture) {