Skip to content

Commit a7dbb78

Browse files
committed
GH-2072: Remove Invalid Deprecation Suppressions
Resolves #2072 `Sample.stop(Timer)` is no longer deprecated.
1 parent c2362f1 commit a7dbb78

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

spring-kafka/src/main/java/org/springframework/kafka/support/micrometer/MicrometerHolder.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 the original author or authors.
2+
* Copyright 2020-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -91,7 +91,6 @@ public Object start() {
9191
* @param sample the sample.
9292
* @see #start()
9393
*/
94-
@SuppressWarnings("deprecation")
9594
public void success(Object sample) {
9695
Timer timer = this.meters.get(NONE_EXCEPTION_METERS_KEY);
9796
if (timer != null) {
@@ -105,7 +104,6 @@ public void success(Object sample) {
105104
* @param exception the exception name.
106105
* @see #start()
107106
*/
108-
@SuppressWarnings("deprecation")
109107
public void failure(Object sample, String exception) {
110108
Timer timer = this.meters.get(exception);
111109
if (timer == null) {

spring-kafka/src/test/java/org/springframework/kafka/support/micrometer/MicrometerHolderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 the original author or authors.
2+
* Copyright 2020-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@
4242
*/
4343
public class MicrometerHolderTests {
4444

45-
@SuppressWarnings({ "unchecked", "deprecation" })
45+
@SuppressWarnings("unchecked")
4646
@Test
4747
public void testMicrometerHolderRecordSuccessWorksGracefullyAfterDestroy() {
4848
MeterRegistry meterRegistry = new SimpleMeterRegistry();

0 commit comments

Comments
 (0)