Consistent use of @Deprecated(since = "6.0")

This commit is contained in:
Sam Brannen
2022-09-20 14:32:27 +02:00
parent 91bca55cbf
commit 321092ce6f
101 changed files with 174 additions and 174 deletions

View File

@@ -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) {

View File

@@ -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
* <strong>not</strong> 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 <strong>not</strong> share data and returns a copy.
*/
@Deprecated
@Deprecated(since = "6.0")
ByteBuffer asByteBuffer(int index, int length);
/**

View File

@@ -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();
/**

View File

@@ -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<String> loadFactoryNames(Class<?> factoryType, @Nullable ClassLoader classLoader) {
return forDefaultResourceLocation(classLoader).loadFactoryNames(factoryType);
}

View File

@@ -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 {
/**

View File

@@ -159,7 +159,7 @@ public final class ConcurrentLruCache<K, V> {
* 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;
}

View File

@@ -708,7 +708,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
* @param <T> 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<T extends MimeType> implements Comparator<T> {
@Override

View File

@@ -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<MimeType> SPECIFICITY_COMPARATOR = new MimeType.SpecificityComparator<>();
/**

View File

@@ -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();
}

View File

@@ -32,7 +32,7 @@ import java.util.concurrent.TimeoutException;
* @param <T> 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<T> implements ListenableFuture<T> {
private final CompletableFuture<T> completableFuture;

View File

@@ -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 {

View File

@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
* @param <S> 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<T, S> implements Future<T> {
private final Future<S> adaptee;

View File

@@ -34,7 +34,7 @@ import java.util.function.BiConsumer;
* @param <T> 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<T> extends Future<T> {
/**
@@ -43,7 +43,7 @@ public interface ListenableFuture<T> extends Future<T> {
* @deprecated as of 6.0, in favor of
* {@link CompletableFuture#whenComplete(BiConsumer)}
*/
@Deprecated
@Deprecated(since = "6.0")
void addCallback(ListenableFutureCallback<? super T> callback);
/**
@@ -54,7 +54,7 @@ public interface ListenableFuture<T> extends Future<T> {
* @deprecated as of 6.0, in favor of
* {@link CompletableFuture#whenComplete(BiConsumer)}
*/
@Deprecated
@Deprecated(since = "6.0")
void addCallback(SuccessCallback<? super T> successCallback, FailureCallback failureCallback);

View File

@@ -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<T, S> extends FutureAdapter<T, S> implements ListenableFuture<T> {
/**

View File

@@ -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<T> extends SuccessCallback<T>, FailureCallback {
}

View File

@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
* @param <T> the callback result type
* @deprecated as of 6.0, with no concrete replacement
*/
@Deprecated
@Deprecated(since = "6.0")
public class ListenableFutureCallbackRegistry<T> {
private final Queue<SuccessCallback<? super T>> successCallbacks = new ArrayDeque<>(1);

View File

@@ -31,7 +31,7 @@ import org.springframework.lang.Nullable;
* @param <T> 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<T> extends FutureTask<T> implements ListenableFuture<T> {
private final ListenableFutureCallbackRegistry<T> callbacks = new ListenableFutureCallbackRegistry<>();

View File

@@ -29,7 +29,7 @@ import reactor.core.publisher.Mono;
* @param <T> the object type
* @deprecated as of 6.0, in favor of {@link Mono#toFuture()}
*/
@Deprecated
@Deprecated(since = "6.0")
public class MonoToListenableFutureAdapter<T> extends CompletableToListenableFutureAdapter<T> {
public MonoToListenableFutureAdapter(Mono<T> mono) {

View File

@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
* @param <T> 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<T> implements ListenableFuture<T> {
private static final Callable<Object> DUMMY_CALLABLE = () -> {

View File

@@ -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<T> {