Skip to content

Commit 5fbb81d

Browse files
committed
Fix missing "since" attributes for Deprecated code
See gh-34989
1 parent 1e9179a commit 5fbb81d

File tree

13 files changed

+38
-38
lines changed

13 files changed

+38
-38
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,14 +616,14 @@ public BeanContextMatcher(String expression) {
616616

617617
@Override
618618
@SuppressWarnings("rawtypes")
619-
@Deprecated
619+
@Deprecated(since = "4.0") // deprecated by AspectJ
620620
public boolean couldMatchJoinPointsInType(Class someClass) {
621621
return (contextMatch(someClass) == FuzzyBoolean.YES);
622622
}
623623

624624
@Override
625625
@SuppressWarnings("rawtypes")
626-
@Deprecated
626+
@Deprecated(since = "4.0") // deprecated by AspectJ
627627
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
628628
return (contextMatch(someClass) == FuzzyBoolean.YES);
629629
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public int getLine() {
319319
}
320320

321321
@Override
322-
@Deprecated
322+
@Deprecated(since = "4.0") // deprecated by AspectJ
323323
public int getColumn() {
324324
throw new UnsupportedOperationException();
325325
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* @deprecated This class should only be used by the runtime-hints agent when instrumenting bytecode
4545
* and is not considered public API.
4646
*/
47-
@Deprecated
47+
@Deprecated(since = "6.0")
4848
public abstract class InstrumentedBridgeMethods {
4949

5050
private InstrumentedBridgeMethods() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @deprecated as of 7.0 in favor of the {@code -XX:MissingRegistrationReportingMode=Warn} and
4444
* {@code -XX:MissingRegistrationReportingMode=Exit} JVM flags with GraalVM.
4545
*/
46-
@Deprecated(forRemoval = true)
46+
@Deprecated(since = "7.0", forRemoval = true)
4747
public final class RuntimeHintsAgent {
4848

4949
private static boolean loaded = false;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @deprecated as of 7.0 in favor of the {@code -XX:MissingRegistrationReportingMode=Warn} and
3535
* {@code -XX:MissingRegistrationReportingMode=Exit} JVM flags with GraalVM.
3636
*/
37-
@Deprecated(forRemoval = true)
37+
@Deprecated(since = "7.0", forRemoval = true)
3838
@SuppressWarnings("removal")
3939
public final class RuntimeHintsRecorder {
4040

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ public int capacity() {
8585
}
8686

8787
@Override
88-
@Deprecated
88+
@Deprecated(since = "6.0")
8989
public DataBuffer capacity(int capacity) {
9090
return this.delegate.capacity(capacity);
9191
}
9292

9393
@Override
94-
@Deprecated
94+
@Deprecated(since = "6.0")
9595
public DataBuffer ensureCapacity(int capacity) {
9696
return this.delegate.ensureCapacity(capacity);
9797
}
@@ -173,13 +173,13 @@ public DataBuffer write(CharSequence charSequence,
173173
}
174174

175175
@Override
176-
@Deprecated
176+
@Deprecated(since = "6.0")
177177
public DataBuffer slice(int index, int length) {
178178
return this.delegate.slice(index, length);
179179
}
180180

181181
@Override
182-
@Deprecated
182+
@Deprecated(since = "6.0")
183183
public DataBuffer retainedSlice(int index, int length) {
184184
return this.delegate.retainedSlice(index, length);
185185
}
@@ -190,25 +190,25 @@ public DataBuffer split(int index) {
190190
}
191191

192192
@Override
193-
@Deprecated
193+
@Deprecated(since = "6.0")
194194
public ByteBuffer asByteBuffer() {
195195
return this.delegate.asByteBuffer();
196196
}
197197

198198
@Override
199-
@Deprecated
199+
@Deprecated(since = "6.0")
200200
public ByteBuffer asByteBuffer(int index, int length) {
201201
return this.delegate.asByteBuffer(index, length);
202202
}
203203

204204
@Override
205-
@Deprecated
205+
@Deprecated(since = "6.0.5")
206206
public ByteBuffer toByteBuffer() {
207207
return this.delegate.toByteBuffer();
208208
}
209209

210210
@Override
211-
@Deprecated
211+
@Deprecated(since = "6.0.5")
212212
public ByteBuffer toByteBuffer(int index, int length) {
213213
return this.delegate.toByteBuffer(index, length);
214214
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public int capacity() {
180180
}
181181

182182
@Override
183-
@Deprecated
183+
@Deprecated(since = "6.0")
184184
public DataBuffer capacity(int capacity) {
185185
setCapacity(capacity);
186186
return this;
@@ -340,7 +340,7 @@ private void write(ByteBuffer source) {
340340
}
341341

342342
@Override
343-
@Deprecated
343+
@Deprecated(since = "6.0")
344344
public DefaultDataBuffer slice(int index, int length) {
345345
checkIndex(index, length);
346346
int oldPosition = this.byteBuffer.position();
@@ -380,13 +380,13 @@ public DefaultDataBuffer split(int index) {
380380
}
381381

382382
@Override
383-
@Deprecated
383+
@Deprecated(since = "6.0")
384384
public ByteBuffer asByteBuffer() {
385385
return asByteBuffer(this.readPosition, readableByteCount());
386386
}
387387

388388
@Override
389-
@Deprecated
389+
@Deprecated(since = "6.0")
390390
public ByteBuffer asByteBuffer(int index, int length) {
391391
checkIndex(index, length);
392392

@@ -397,7 +397,7 @@ public ByteBuffer asByteBuffer(int index, int length) {
397397
}
398398

399399
@Override
400-
@Deprecated
400+
@Deprecated(since = "6.0.5")
401401
public ByteBuffer toByteBuffer(int index, int length) {
402402
checkIndex(index, length);
403403

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public DefaultDataBufferFactory(boolean preferDirect, int defaultInitialCapacity
8585

8686

8787
@Override
88-
@Deprecated
88+
@Deprecated(since = "6.0")
8989
public DefaultDataBuffer allocateBuffer() {
9090
return allocateBuffer(this.defaultInitialCapacity);
9191
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public int capacity() {
138138
}
139139

140140
@Override
141-
@Deprecated
141+
@Deprecated(since = "6.0")
142142
public DataBuffer capacity(int capacity) {
143143
this.delegate.capacity(capacity);
144144
return this;
@@ -225,7 +225,7 @@ public DataBuffer write(ByteBuffer... buffers) {
225225
}
226226

227227
@Override
228-
@Deprecated
228+
@Deprecated(since = "6.0")
229229
public DataBuffer slice(int index, int length) {
230230
DefaultDataBuffer delegateSlice = this.delegate.slice(index, length);
231231
if (this.chunk != null) {
@@ -250,19 +250,19 @@ public DataBuffer split(int index) {
250250
}
251251

252252
@Override
253-
@Deprecated
253+
@Deprecated(since = "6.0")
254254
public ByteBuffer asByteBuffer() {
255255
return this.delegate.asByteBuffer();
256256
}
257257

258258
@Override
259-
@Deprecated
259+
@Deprecated(since = "6.0")
260260
public ByteBuffer asByteBuffer(int index, int length) {
261261
return this.delegate.asByteBuffer(index, length);
262262
}
263263

264264
@Override
265-
@Deprecated
265+
@Deprecated(since = "6.0.5")
266266
public ByteBuffer toByteBuffer(int index, int length) {
267267
return this.delegate.toByteBuffer(index, length);
268268
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public JettyDataBufferFactory(boolean preferDirect, int defaultInitialCapacity)
6565

6666

6767
@Override
68-
@Deprecated
68+
@Deprecated(since = "6.0")
6969
public JettyDataBuffer allocateBuffer() {
7070
DefaultDataBuffer delegate = this.delegate.allocateBuffer();
7171
return new JettyDataBuffer(this, delegate);

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public int capacity() {
135135
}
136136

137137
@Override
138-
@Deprecated
138+
@Deprecated(since = "6.0")
139139
public NettyDataBuffer capacity(int capacity) {
140140
this.byteBuf.capacity(capacity);
141141
return this;
@@ -255,14 +255,14 @@ else if (StandardCharsets.US_ASCII.equals(charset)) {
255255
}
256256

257257
@Override
258-
@Deprecated
258+
@Deprecated(since = "6.0")
259259
public NettyDataBuffer slice(int index, int length) {
260260
ByteBuf slice = this.byteBuf.slice(index, length);
261261
return new NettyDataBuffer(slice, this.dataBufferFactory);
262262
}
263263

264264
@Override
265-
@Deprecated
265+
@Deprecated(since = "6.0")
266266
public NettyDataBuffer retainedSlice(int index, int length) {
267267
ByteBuf slice = this.byteBuf.retainedSlice(index, length);
268268
return new NettyDataBuffer(slice, this.dataBufferFactory);
@@ -285,19 +285,19 @@ public NettyDataBuffer split(int index) {
285285
}
286286

287287
@Override
288-
@Deprecated
288+
@Deprecated(since = "6.0")
289289
public ByteBuffer asByteBuffer() {
290290
return this.byteBuf.nioBuffer();
291291
}
292292

293293
@Override
294-
@Deprecated
294+
@Deprecated(since = "6.0")
295295
public ByteBuffer asByteBuffer(int index, int length) {
296296
return this.byteBuf.nioBuffer(index, length);
297297
}
298298

299299
@Override
300-
@Deprecated
300+
@Deprecated(since = "6.0.5")
301301
public ByteBuffer toByteBuffer(int index, int length) {
302302
ByteBuffer result = this.byteBuf.isDirect() ?
303303
ByteBuffer.allocateDirect(length) :

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public ByteBufAllocator getByteBufAllocator() {
6161
}
6262

6363
@Override
64-
@Deprecated
64+
@Deprecated(since = "6.0")
6565
public NettyDataBuffer allocateBuffer() {
6666
ByteBuf byteBuf = this.byteBufAllocator.buffer();
6767
return new NettyDataBuffer(byteBuf, this);

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public int capacity() {
162162
}
163163

164164
@Override
165-
@Deprecated
165+
@Deprecated(since = "6.0")
166166
public DataBuffer capacity(int capacity) {
167167
this.delegate.capacity(capacity);
168168
return this;
@@ -249,7 +249,7 @@ public DataBuffer write(ByteBuffer... buffers) {
249249
}
250250

251251
@Override
252-
@Deprecated
252+
@Deprecated(since = "6.0")
253253
public DataBuffer slice(int index, int length) {
254254
DataBuffer delegateSlice = this.delegate.slice(index, length);
255255
return new JettyCallbackDataBuffer(delegateSlice, this.callback);
@@ -262,19 +262,19 @@ public DataBuffer split(int index) {
262262
}
263263

264264
@Override
265-
@Deprecated
265+
@Deprecated(since = "6.0")
266266
public ByteBuffer asByteBuffer() {
267267
return this.delegate.asByteBuffer();
268268
}
269269

270270
@Override
271-
@Deprecated
271+
@Deprecated(since = "6.0")
272272
public ByteBuffer asByteBuffer(int index, int length) {
273273
return this.delegate.asByteBuffer(index, length);
274274
}
275275

276276
@Override
277-
@Deprecated
277+
@Deprecated(since = "6.0.5")
278278
public ByteBuffer toByteBuffer(int index, int length) {
279279
return this.delegate.toByteBuffer(index, length);
280280
}

0 commit comments

Comments
 (0)