File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
core/src/main/java/io/smallrye/context Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -343,4 +343,35 @@ void superCompleteExceptionally(Throwable x) {
343343 void superComplete (T val ) {
344344 super .complete (val );
345345 }
346+
347+ // Java 12
348+
349+ @ Override
350+ public CompletableFuture <T > exceptionallyAsync (Function <Throwable , ? extends T > fn ) {
351+ checkDefaultExecutor ();
352+ return super .exceptionallyAsync (context .contextualFunctionUnlessContextualized (fn ), executor );
353+ }
354+
355+ @ Override
356+ public CompletableFuture <T > exceptionallyAsync (Function <Throwable , ? extends T > fn , Executor executor ) {
357+ return super .exceptionallyAsync (context .contextualFunctionUnlessContextualized (fn ), executor );
358+ }
359+
360+ @ Override
361+ public CompletableFuture <T > exceptionallyCompose (Function <Throwable , ? extends CompletionStage <T >> fn ) {
362+ return super .exceptionallyCompose (context .contextualFunctionUnlessContextualized (fn ));
363+ }
364+
365+ @ Override
366+ public CompletableFuture <T > exceptionallyComposeAsync (Function <Throwable , ? extends CompletionStage <T >> fn ) {
367+ checkDefaultExecutor ();
368+ return super .exceptionallyComposeAsync (context .contextualFunctionUnlessContextualized (fn ), executor );
369+ }
370+
371+ @ Override
372+ public CompletableFuture <T > exceptionallyComposeAsync (Function <Throwable , ? extends CompletionStage <T >> fn ,
373+ Executor executor ) {
374+ return super .exceptionallyComposeAsync (context .contextualFunctionUnlessContextualized (fn ), executor );
375+ }
376+
346377}
You can’t perform that action at this time.
0 commit comments