Browse Source

Fix missing "since" attributes for Deprecated code

See gh-34989
pull/34996/head
Brian Clozel 7 months ago
parent
commit
5fbb81de10
  1. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
  2. 2
      spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java
  3. 2
      spring-core-test/src/main/java/org/springframework/aot/agent/InstrumentedBridgeMethods.java
  4. 2
      spring-core-test/src/main/java/org/springframework/aot/agent/RuntimeHintsAgent.java
  5. 2
      spring-core-test/src/main/java/org/springframework/aot/test/agent/RuntimeHintsRecorder.java
  6. 16
      spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferWrapper.java
  7. 10
      spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java
  8. 2
      spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBufferFactory.java
  9. 10
      spring-core/src/main/java/org/springframework/core/io/buffer/JettyDataBuffer.java
  10. 2
      spring-core/src/main/java/org/springframework/core/io/buffer/JettyDataBufferFactory.java
  11. 12
      spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBuffer.java
  12. 2
      spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBufferFactory.java
  13. 10
      spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java

4
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java

@ -616,14 +616,14 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut @@ -616,14 +616,14 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
@Override
@SuppressWarnings("rawtypes")
@Deprecated
@Deprecated(since = "4.0") // deprecated by AspectJ
public boolean couldMatchJoinPointsInType(Class someClass) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}
@Override
@SuppressWarnings("rawtypes")
@Deprecated
@Deprecated(since = "4.0") // deprecated by AspectJ
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}

2
spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java

@ -319,7 +319,7 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @@ -319,7 +319,7 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
}
@Override
@Deprecated
@Deprecated(since = "4.0") // deprecated by AspectJ
public int getColumn() {
throw new UnsupportedOperationException();
}

2
spring-core-test/src/main/java/org/springframework/aot/agent/InstrumentedBridgeMethods.java

@ -44,7 +44,7 @@ import org.jspecify.annotations.Nullable; @@ -44,7 +44,7 @@ import org.jspecify.annotations.Nullable;
* @deprecated This class should only be used by the runtime-hints agent when instrumenting bytecode
* and is not considered public API.
*/
@Deprecated
@Deprecated(since = "6.0")
public abstract class InstrumentedBridgeMethods {
private InstrumentedBridgeMethods() {

2
spring-core-test/src/main/java/org/springframework/aot/agent/RuntimeHintsAgent.java

@ -43,7 +43,7 @@ import org.springframework.util.StringUtils; @@ -43,7 +43,7 @@ import org.springframework.util.StringUtils;
* @deprecated as of 7.0 in favor of the {@code -XX:MissingRegistrationReportingMode=Warn} and
* {@code -XX:MissingRegistrationReportingMode=Exit} JVM flags with GraalVM.
*/
@Deprecated(forRemoval = true)
@Deprecated(since = "7.0", forRemoval = true)
public final class RuntimeHintsAgent {
private static boolean loaded = false;

2
spring-core-test/src/main/java/org/springframework/aot/test/agent/RuntimeHintsRecorder.java

@ -34,7 +34,7 @@ import org.springframework.util.Assert; @@ -34,7 +34,7 @@ import org.springframework.util.Assert;
* @deprecated as of 7.0 in favor of the {@code -XX:MissingRegistrationReportingMode=Warn} and
* {@code -XX:MissingRegistrationReportingMode=Exit} JVM flags with GraalVM.
*/
@Deprecated(forRemoval = true)
@Deprecated(since = "7.0", forRemoval = true)
@SuppressWarnings("removal")
public final class RuntimeHintsRecorder {

16
spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferWrapper.java

@ -85,13 +85,13 @@ public class DataBufferWrapper implements DataBuffer { @@ -85,13 +85,13 @@ public class DataBufferWrapper implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer capacity(int capacity) {
return this.delegate.capacity(capacity);
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer ensureCapacity(int capacity) {
return this.delegate.ensureCapacity(capacity);
}
@ -173,13 +173,13 @@ public class DataBufferWrapper implements DataBuffer { @@ -173,13 +173,13 @@ public class DataBufferWrapper implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer slice(int index, int length) {
return this.delegate.slice(index, length);
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer retainedSlice(int index, int length) {
return this.delegate.retainedSlice(index, length);
}
@ -190,25 +190,25 @@ public class DataBufferWrapper implements DataBuffer { @@ -190,25 +190,25 @@ public class DataBufferWrapper implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer() {
return this.delegate.asByteBuffer();
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer(int index, int length) {
return this.delegate.asByteBuffer(index, length);
}
@Override
@Deprecated
@Deprecated(since = "6.0.5")
public ByteBuffer toByteBuffer() {
return this.delegate.toByteBuffer();
}
@Override
@Deprecated
@Deprecated(since = "6.0.5")
public ByteBuffer toByteBuffer(int index, int length) {
return this.delegate.toByteBuffer(index, length);
}

10
spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java

@ -180,7 +180,7 @@ public class DefaultDataBuffer implements DataBuffer { @@ -180,7 +180,7 @@ public class DefaultDataBuffer implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer capacity(int capacity) {
setCapacity(capacity);
return this;
@ -340,7 +340,7 @@ public class DefaultDataBuffer implements DataBuffer { @@ -340,7 +340,7 @@ public class DefaultDataBuffer implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DefaultDataBuffer slice(int index, int length) {
checkIndex(index, length);
int oldPosition = this.byteBuffer.position();
@ -380,13 +380,13 @@ public class DefaultDataBuffer implements DataBuffer { @@ -380,13 +380,13 @@ public class DefaultDataBuffer implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer() {
return asByteBuffer(this.readPosition, readableByteCount());
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer(int index, int length) {
checkIndex(index, length);
@ -397,7 +397,7 @@ public class DefaultDataBuffer implements DataBuffer { @@ -397,7 +397,7 @@ public class DefaultDataBuffer implements DataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0.5")
public ByteBuffer toByteBuffer(int index, int length) {
checkIndex(index, length);

2
spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBufferFactory.java

@ -85,7 +85,7 @@ public class DefaultDataBufferFactory implements DataBufferFactory { @@ -85,7 +85,7 @@ public class DefaultDataBufferFactory implements DataBufferFactory {
@Override
@Deprecated
@Deprecated(since = "6.0")
public DefaultDataBuffer allocateBuffer() {
return allocateBuffer(this.defaultInitialCapacity);
}

10
spring-core/src/main/java/org/springframework/core/io/buffer/JettyDataBuffer.java

@ -138,7 +138,7 @@ public final class JettyDataBuffer implements PooledDataBuffer { @@ -138,7 +138,7 @@ public final class JettyDataBuffer implements PooledDataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer capacity(int capacity) {
this.delegate.capacity(capacity);
return this;
@ -225,7 +225,7 @@ public final class JettyDataBuffer implements PooledDataBuffer { @@ -225,7 +225,7 @@ public final class JettyDataBuffer implements PooledDataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer slice(int index, int length) {
DefaultDataBuffer delegateSlice = this.delegate.slice(index, length);
if (this.chunk != null) {
@ -250,19 +250,19 @@ public final class JettyDataBuffer implements PooledDataBuffer { @@ -250,19 +250,19 @@ public final class JettyDataBuffer implements PooledDataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer() {
return this.delegate.asByteBuffer();
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer(int index, int length) {
return this.delegate.asByteBuffer(index, length);
}
@Override
@Deprecated
@Deprecated(since = "6.0.5")
public ByteBuffer toByteBuffer(int index, int length) {
return this.delegate.toByteBuffer(index, length);
}

2
spring-core/src/main/java/org/springframework/core/io/buffer/JettyDataBufferFactory.java

@ -65,7 +65,7 @@ public class JettyDataBufferFactory implements DataBufferFactory { @@ -65,7 +65,7 @@ public class JettyDataBufferFactory implements DataBufferFactory {
@Override
@Deprecated
@Deprecated(since = "6.0")
public JettyDataBuffer allocateBuffer() {
DefaultDataBuffer delegate = this.delegate.allocateBuffer();
return new JettyDataBuffer(this, delegate);

12
spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBuffer.java

@ -135,7 +135,7 @@ public class NettyDataBuffer implements PooledDataBuffer { @@ -135,7 +135,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public NettyDataBuffer capacity(int capacity) {
this.byteBuf.capacity(capacity);
return this;
@ -255,14 +255,14 @@ public class NettyDataBuffer implements PooledDataBuffer { @@ -255,14 +255,14 @@ public class NettyDataBuffer implements PooledDataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public NettyDataBuffer slice(int index, int length) {
ByteBuf slice = this.byteBuf.slice(index, length);
return new NettyDataBuffer(slice, this.dataBufferFactory);
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public NettyDataBuffer retainedSlice(int index, int length) {
ByteBuf slice = this.byteBuf.retainedSlice(index, length);
return new NettyDataBuffer(slice, this.dataBufferFactory);
@ -285,19 +285,19 @@ public class NettyDataBuffer implements PooledDataBuffer { @@ -285,19 +285,19 @@ public class NettyDataBuffer implements PooledDataBuffer {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer() {
return this.byteBuf.nioBuffer();
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer(int index, int length) {
return this.byteBuf.nioBuffer(index, length);
}
@Override
@Deprecated
@Deprecated(since = "6.0.5")
public ByteBuffer toByteBuffer(int index, int length) {
ByteBuffer result = this.byteBuf.isDirect() ?
ByteBuffer.allocateDirect(length) :

2
spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBufferFactory.java

@ -61,7 +61,7 @@ public class NettyDataBufferFactory implements DataBufferFactory { @@ -61,7 +61,7 @@ public class NettyDataBufferFactory implements DataBufferFactory {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public NettyDataBuffer allocateBuffer() {
ByteBuf byteBuf = this.byteBufAllocator.buffer();
return new NettyDataBuffer(byteBuf, this);

10
spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java

@ -162,7 +162,7 @@ public class JettyWebSocketHandlerAdapter implements Session.Listener { @@ -162,7 +162,7 @@ public class JettyWebSocketHandlerAdapter implements Session.Listener {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer capacity(int capacity) {
this.delegate.capacity(capacity);
return this;
@ -249,7 +249,7 @@ public class JettyWebSocketHandlerAdapter implements Session.Listener { @@ -249,7 +249,7 @@ public class JettyWebSocketHandlerAdapter implements Session.Listener {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public DataBuffer slice(int index, int length) {
DataBuffer delegateSlice = this.delegate.slice(index, length);
return new JettyCallbackDataBuffer(delegateSlice, this.callback);
@ -262,19 +262,19 @@ public class JettyWebSocketHandlerAdapter implements Session.Listener { @@ -262,19 +262,19 @@ public class JettyWebSocketHandlerAdapter implements Session.Listener {
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer() {
return this.delegate.asByteBuffer();
}
@Override
@Deprecated
@Deprecated(since = "6.0")
public ByteBuffer asByteBuffer(int index, int length) {
return this.delegate.asByteBuffer(index, length);
}
@Override
@Deprecated
@Deprecated(since = "6.0.5")
public ByteBuffer toByteBuffer(int index, int length) {
return this.delegate.toByteBuffer(index, length);
}

Loading…
Cancel
Save