He-Pin opened a new pull request, #3148:
URL: https://github.com/apache/pekko/pull/3148

   ### Motivation
   
   `Futures.failedCompletionStage` was `@deprecated("Use 
CompletableFuture#failedStage instead.", "2.0.0")` and used the dangerous 
`obtrudeException` API which can corrupt other futures sharing the same 
underlying `CompletableFuture`. `CompletableFuture.failedStage` (JDK 9) is the 
correct replacement.
   
   ### Modification
   
   - Remove `failedCompletionStage` method from `Futures` object in 
`Future.scala`
   - Replace internal call in `CompletionStages.reduce` with 
`CompletableFuture.failedStage`
   - Replace test call sites with `CompletableFuture.failedStage`
   - Remove unnecessary `@SuppressWarnings("deprecation")` from 2 test methods
   - Remove unused `CompletableFuture` import from `Future.scala`
   
   ### Result
   
   Eliminates `obtrudeException` usage, removes deprecated API.
   
   ### Tests
   
   - `sbt "actor-tests / Test / testOnly org.apache.pekko.pattern.PatternsTest 
org.apache.pekko.dispatch.CompletionStagesTests"` — 40/40 passed
   
   ### References
   
   Refs #3136


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to