Skip to content

Commit

Permalink
Use empty default values when building no-op CP instance
Browse files Browse the repository at this point in the history
This is done in order to avoid the overhead of
looking up properties that won't be used anyway

Requires: smallrye/smallrye-context-propagation#477
Signed-off-by: Georgios Andrianakis <[email protected]>
  • Loading branch information
geoand authored and gsmet committed Jan 9, 2025
1 parent 8644137 commit 3fdca80
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.smallrye.context.SmallRyeContextManager;
import io.smallrye.context.SmallRyeManagedExecutor;
import io.smallrye.context.SmallRyeThreadContext;
import io.smallrye.context.impl.DefaultValues;

/**
* The runtime value service used to create values related to the MP-JWT services
Expand Down Expand Up @@ -141,6 +142,7 @@ public void configureStaticInit(List<ThreadContextProvider> discoveredProviders,
noContextBuilder.withThreadContextProviders(new ThreadContextProvider[0]);
noContextBuilder.withContextManagerExtensions(new ContextManagerExtension[0]);
noContextBuilder.withDefaultExecutorService(NOPE_EXECUTOR_SERVICE);
noContextBuilder.withDefaultValues(DefaultValues.empty());
ContextManagerProvider.instance().registerContextManager(noContextBuilder.build(), null /* not used */);
}

Expand Down

0 comments on commit 3fdca80

Please sign in to comment.