Skip to content

Commit 479165f

Browse files
committed
Crypt - renamed unused variables to ignored
1 parent 3cb1fe7 commit 479165f

File tree

2 files changed

+7
-8
lines changed
  • driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/crypt
  • driver-sync/src/main/com/mongodb/client/internal

2 files changed

+7
-8
lines changed

driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/crypt/Crypt.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ public Mono<BsonValue> decryptExplicitly(final BsonBinary value) {
203203
@SuppressWarnings("try")
204204
public void close() {
205205
//noinspection EmptyTryBlock
206-
try (MongoCrypt mongoCrypt = this.mongoCrypt;
207-
CommandMarker commandMarker = this.commandMarker;
208-
MongoClient internalClient = this.internalClient;
209-
KeyManagementService keyManagementService = this.keyManagementService
206+
try (MongoCrypt ignored = this.mongoCrypt;
207+
CommandMarker ignored1 = this.commandMarker;
208+
MongoClient ignored2 = this.internalClient;
209+
KeyManagementService ignored3 = this.keyManagementService
210210
) {
211211
// just using try-with-resources to ensure they all get closed, even in the case of exceptions
212212
}

driver-sync/src/main/com/mongodb/client/internal/Crypt.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.mongodb.MongoClientException;
2020
import com.mongodb.MongoException;
2121
import com.mongodb.MongoInternalException;
22-
import com.mongodb.assertions.Assertions;
2322
import com.mongodb.client.MongoClient;
2423
import com.mongodb.client.model.vault.DataKeyOptions;
2524
import com.mongodb.client.model.vault.EncryptOptions;
@@ -232,9 +231,9 @@ BsonValue decryptExplicitly(final BsonBinary value) {
232231
@SuppressWarnings("try")
233232
public void close() {
234233
//noinspection EmptyTryBlock
235-
try (MongoCrypt mongoCrypt = this.mongoCrypt;
236-
CommandMarker commandMarker = this.commandMarker;
237-
MongoClient internalClient = this.internalClient
234+
try (MongoCrypt ignored = this.mongoCrypt;
235+
CommandMarker ignored1 = this.commandMarker;
236+
MongoClient ignored2 = this.internalClient
238237
) {
239238
// just using try-with-resources to ensure they all get closed, even in the case of exceptions
240239
}

0 commit comments

Comments
 (0)