Skip to content

Commit cf988b5

Browse files
rozzajyemin
authored andcommitted
Suppress not used in try body compiler warnings
Suppresses messages in the form of: warning: [try] auto-closeable resource 'x' is never referenced in body of corresponding try statement.
1 parent d82270e commit cf988b5

File tree

2 files changed

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

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public Mono<BsonValue> decryptExplicitly(final BsonBinary value) {
173173
}
174174

175175
@Override
176+
@SuppressWarnings("try")
176177
public void close() {
177178
//noinspection EmptyTryBlock
178179
try (MongoCrypt mongoCrypt = this.mongoCrypt;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ BsonValue decryptExplicitly(final BsonBinary value) {
220220
}
221221

222222
@Override
223+
@SuppressWarnings("try")
223224
public void close() {
224225
//noinspection EmptyTryBlock
225226
try (MongoCrypt mongoCrypt = this.mongoCrypt;

0 commit comments

Comments
 (0)