Skip to content

Commit 0c72478

Browse files
committed
Update
1 parent 389e667 commit 0c72478

File tree

8 files changed

+2
-18
lines changed

8 files changed

+2
-18
lines changed

driver/src/main/java/org/neo4j/driver/internal/async/NetworkSession.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ public CompletionStage<UnmanagedTransaction> beginTransactionAsync(
311311
return newTransactionStage;
312312
}
313313

314-
@SuppressWarnings("ThrowableNotThrown")
315314
public CompletionStage<Void> resetAsync() {
316315
return existingTransactionOrNull()
317316
.thenAccept(tx -> {

driver/src/main/java/org/neo4j/driver/internal/async/UnmanagedTransaction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ private void addSuppressedWhenNotCaptured(Throwable currentCause, Throwable newC
302302
}
303303
}
304304

305-
@SuppressWarnings("ThrowableNotThrown")
306305
public CompletionStage<Void> terminateAsync() {
307306
return executeWithLock(lock, () -> {
308307
if (!isOpen() || commitFuture != null || rollbackFuture != null) {

driver/src/main/java/org/neo4j/driver/internal/reactive/InternalReactiveTransaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected InternalReactiveTransaction(UnmanagedTransaction tx) {
3535
}
3636

3737
@Override
38-
@SuppressWarnings({"ThrowableNotThrown", "DuplicatedCode"})
38+
@SuppressWarnings({"DuplicatedCode"})
3939
public Publisher<ReactiveResult> run(Query query) {
4040
CompletionStage<RxResultCursor> cursorStage;
4141
try {

driver/src/main/java/org/neo4j/driver/internal/reactive/InternalRxTransaction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public InternalRxTransaction(UnmanagedTransaction tx) {
3333
}
3434

3535
@Override
36-
@SuppressWarnings("ThrowableNotThrown")
3736
public RxResult run(Query query) {
3837
return new InternalRxResult(() -> {
3938
var cursorFuture = new CompletableFuture<RxResultCursor>();

driver/src/main/java/org/neo4j/driver/internal/reactivestreams/InternalReactiveTransaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected InternalReactiveTransaction(UnmanagedTransaction tx) {
3434
}
3535

3636
@Override
37-
@SuppressWarnings({"ThrowableNotThrown", "DuplicatedCode"})
37+
@SuppressWarnings({"DuplicatedCode"})
3838
public Publisher<ReactiveResult> run(Query query) {
3939
CompletionStage<RxResultCursor> cursorStage;
4040
try {

driver/src/test/java/org/neo4j/driver/integration/UnmanagedTransactionIT.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ void shouldFailToCommitAfterRollback() {
105105
}
106106

107107
@Test
108-
@SuppressWarnings("ThrowableNotThrown")
109108
void shouldFailToCommitAfterTermination() {
110109
var tx = beginTransaction();
111110

@@ -137,7 +136,6 @@ void shouldFailToRollbackAfterCommit() {
137136
}
138137

139138
@Test
140-
@SuppressWarnings("ThrowableNotThrown")
141139
void shouldRollbackAfterTermination() {
142140
var tx = beginTransaction();
143141

@@ -148,7 +146,6 @@ void shouldRollbackAfterTermination() {
148146
}
149147

150148
@Test
151-
@SuppressWarnings("ThrowableNotThrown")
152149
void shouldFailToRunQueryWhenTerminated() {
153150
var tx = beginTransaction();
154151
txRun(tx, "CREATE (:MyLabel)");
@@ -161,7 +158,6 @@ void shouldFailToRunQueryWhenTerminated() {
161158
}
162159

163160
@Test
164-
@SuppressWarnings("ThrowableNotThrown")
165161
void shouldBePossibleToRunMoreTransactionsAfterOneIsTerminated() {
166162
var tx1 = beginTransaction();
167163
tx1.markTerminated(null);

driver/src/test/java/org/neo4j/driver/internal/async/UnmanagedTransactionTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ void shouldBeOpenAfterConstruction() {
198198
}
199199

200200
@Test
201-
@SuppressWarnings("ThrowableNotThrown")
202201
void shouldBeClosedWhenMarkedAsTerminated() {
203202
var connection = connectionMock();
204203
given(connection.beginTransaction(any(), any(), any(), any(), any(), any(), any(), any()))
@@ -215,7 +214,6 @@ void shouldBeClosedWhenMarkedAsTerminated() {
215214
}
216215

217216
@Test
218-
@SuppressWarnings("ThrowableNotThrown")
219217
void shouldBeClosedWhenMarkedTerminatedAndClosed() {
220218
var connection = connectionMock();
221219
given(connection.beginTransaction(any(), any(), any(), any(), any(), any(), any(), any()))
@@ -296,7 +294,6 @@ void shouldNotReleaseConnectionWhenBeginSucceeds() {
296294
}
297295

298296
@Test
299-
@SuppressWarnings("ThrowableNotThrown")
300297
void shouldReleaseConnectionWhenTerminatedAndCommitted() {
301298
var connection = connectionMock();
302299
given(connection.close()).willReturn(CompletableFuture.completedStage(null));
@@ -321,7 +318,6 @@ void shouldReleaseConnectionWhenTerminatedAndCommitted() {
321318
}
322319

323320
@Test
324-
@SuppressWarnings("ThrowableNotThrown")
325321
void shouldNotCreateCircularExceptionWhenTerminationCauseEqualsToCursorFailure() {
326322
var connection = connectionMock();
327323
given(connection.close()).willReturn(CompletableFuture.completedStage(null));
@@ -349,7 +345,6 @@ void shouldNotCreateCircularExceptionWhenTerminationCauseEqualsToCursorFailure()
349345
}
350346

351347
@Test
352-
@SuppressWarnings("ThrowableNotThrown")
353348
void shouldNotCreateCircularExceptionWhenTerminationCauseDifferentFromCursorFailure() {
354349
var connection = connectionMock();
355350
given(connection.close()).willReturn(CompletableFuture.completedStage(null));
@@ -379,7 +374,6 @@ void shouldNotCreateCircularExceptionWhenTerminationCauseDifferentFromCursorFail
379374
}
380375

381376
@Test
382-
@SuppressWarnings("ThrowableNotThrown")
383377
void shouldNotCreateCircularExceptionWhenTerminatedWithoutFailure() {
384378
var connection = connectionMock();
385379
given(connection.close()).willReturn(CompletableFuture.completedStage(null));
@@ -405,7 +399,6 @@ void shouldNotCreateCircularExceptionWhenTerminatedWithoutFailure() {
405399
}
406400

407401
@Test
408-
@SuppressWarnings("ThrowableNotThrown")
409402
void shouldReleaseConnectionWhenTerminatedAndRolledBack() {
410403
var connection = connectionMock();
411404
given(connection.close()).willReturn(CompletableFuture.completedStage(null));
@@ -875,7 +868,6 @@ private ResultCursorsHolder mockResultCursorWith(ClientException clientException
875868
return resultCursorsHolder;
876869
}
877870

878-
@SuppressWarnings("ThrowableNotThrown")
879871
private Supplier<CompletionStage<Void>> mapTransactionAction(String actionName, UnmanagedTransaction tx) {
880872
Supplier<CompletionStage<Void>> action;
881873
if ("commit".equals(actionName)) {

driver/src/test/java/org/neo4j/driver/internal/reactive/InternalRxTransactionTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ void shouldDelegateRun(Function<RxTransaction, RxResult> runReturnOne) {
109109

110110
@ParameterizedTest
111111
@MethodSource("allTxRunMethods")
112-
@SuppressWarnings("ThrowableNotThrown")
113112
void shouldMarkTxIfFailedToRun(Function<RxTransaction, RxResult> runReturnOne) {
114113
// Given
115114
Throwable error = new RuntimeException("Hi there");

0 commit comments

Comments
 (0)