Skip to content

Commit a00ba8d

Browse files
committed
Revert "Reuse NoTransactionInContextException instances"
This reverts commit 8e38469. Closes gh-34048
1 parent 4f815b0 commit a00ba8d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionContextManager.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
*/
3838
public abstract class TransactionContextManager {
3939

40-
private static final NoTransactionInContextException NO_TRANSACTION_IN_CONTEXT_EXCEPTION =
41-
new NoTransactionInContextException();
42-
4340
private TransactionContextManager() {
4441
}
4542

@@ -63,7 +60,7 @@ public static Mono<TransactionContext> currentContext() {
6360
return Mono.just(holder.currentContext());
6461
}
6562
}
66-
return Mono.error(NO_TRANSACTION_IN_CONTEXT_EXCEPTION);
63+
return Mono.error(new NoTransactionInContextException());
6764
});
6865
}
6966

0 commit comments

Comments
 (0)