googleapis / googleapis/google-cloud-java
[java-spanner] AsyncTransactionManager.CommitTimestampFuture violates Future.get contract
Aperta
api: spanner
- Lingua principale
- Java
- Stelle
- 2.1k
- Fork
- 1.2k
- Merge medio
- 1g 23h
- PR unite (30g)
- 154
Descrizione
`CommitTimestampFuture` violates the `Future` contract by overriding `get()` to throw any caught exception other than `ExecutionException`. Namely, it unwraps any `AbortedException` and throws that directly.
This breaks any downstream code that operates on that `CommitTimestampFuture` via the `Future` interface. For example, transforming it to a Guava `ListenableFuture` and then calling the `kotlinx.coroutines.guava.await` extension function on it.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.