Skip to content

Commit 49a49eb

Browse files
committed
Supress depracted warnings
1 parent 40fc55a commit 49a49eb

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

topic/src/main/java/tech/ydb/topic/impl/GrpcStreamRetrier.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ protected static String generateRandomId(int length) {
5555
}
5656

5757
private void tryScheduleReconnect() {
58-
if (isStopped.get()) {
59-
getLogger().info("[{}] {} is already stopped, no need to reconnect", id, getStreamName());
60-
return;
61-
}
62-
6358
int currentReconnectCounter = reconnectCounter.get() + 1;
6459
if (MAX_RECONNECT_COUNT > 0 && currentReconnectCounter > MAX_RECONNECT_COUNT) {
6560
if (isStopped.compareAndSet(false, true)) {
@@ -97,6 +92,11 @@ private void tryScheduleReconnect() {
9792
}
9893

9994
void reconnect() {
95+
if (isStopped.get()) {
96+
getLogger().info("[{}] {} is already stopped, no need to reconnect", id, getStreamName());
97+
return;
98+
}
99+
100100
getLogger().info("[{}] {} reconnect #{} started", id, getStreamName(), reconnectCounter.get());
101101
if (!isReconnecting.compareAndSet(true, false)) {
102102
getLogger().warn("Couldn't reset reconnect flag. Shouldn't happen");

topic/src/main/java/tech/ydb/topic/impl/TopicClientImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ private GrpcRequestSettings makeGrpcRequestSettings(BaseRequestSettings settings
8989
}
9090

9191
@Override
92+
@SuppressWarnings("deprecation")
9293
public CompletableFuture<Status> createTopic(String path, CreateTopicSettings settings) {
9394
YdbTopic.CreateTopicRequest.Builder requestBuilder = YdbTopic.CreateTopicRequest.newBuilder()
9495
.setOperationParams(Operation.buildParams(settings))
@@ -125,6 +126,7 @@ public CompletableFuture<Status> createTopic(String path, CreateTopicSettings se
125126
}
126127

127128
@Override
129+
@SuppressWarnings("deprecation")
128130
public CompletableFuture<Status> alterTopic(String path, AlterTopicSettings settings) {
129131
YdbTopic.AlterTopicRequest.Builder requestBuilder = YdbTopic.AlterTopicRequest.newBuilder()
130132
.setOperationParams(Operation.buildParams(settings))
@@ -257,6 +259,7 @@ public CompletableFuture<Result<ConsumerDescription>> describeConsumer(
257259
.thenApply(result -> result.map(ConsumerDescription::new));
258260
}
259261

262+
@SuppressWarnings("deprecation")
260263
private TopicDescription mapDescribeTopic(YdbTopic.DescribeTopicResult result) {
261264
if (logger.isTraceEnabled()) {
262265
logger.trace("Received topic describe response:\n{}", result);

0 commit comments

Comments
 (0)