Stéphane Épardaud
Stéphane Épardaud
I mean, there's a good chance they'll argue the other way and that our API should change…
This is only for the TL we use to override settings locally. I don't think most people use this API. If you want to clear the TL for libs (CDI,...
I already have support for custom thread locals, but nobody's ever dared to use them. So, why don't we always call `set(null)` instead of `remove()` then if it's much cheaper?
OK, so it could be an option. But the problem is that most `ThreadContextProvider` implementations are third-party plugins, so they'd also have to be updated to stop clearing the ThreadLocal....
@franz1981 The original idea behind `StorageDeclaration` is for `ThreadContextProvider` to simply declare their TL storages to SR-CP (see https://github.com/smallrye/smallrye-context-propagation/blob/main/testsuite/extra/src/main/java/io/smallrye/context/test/MyThreadContextProvider.java) and then CP, instead of calling the providers, will simply call...
> We could maybe add some INFO one-time logging into the CDI context provider in this project to let people know? How do you detect that?
LGTM, except the wrapping of `Throwable`, as explained.
``` 2020-08-21T12:35:54.6844857Z [ERROR] Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.12.1:validate (default-cli) on project smallrye-context-propagation: File '/home/runner/work/smallrye-context-propagation/smallrye-context-propagation/core/src/main/java/io/smallrye/context/impl/ActiveContextState.java' has not been previously formatted. Please format file and commit before running validation! -> [Help 1]...
TBH I do wonder why we have to log an exception we rethrow, shouldn't it be logged by the caller?
> @FroMage AFAICT it gets swallowed by the CP plumbing If we have exception-swallowing in SR-CP I want to know where and fix it. Do you have stack traces?