You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rename ThreadLocalDataStorage to improve readability #905
ThreadLocalDataStorage is used to signal that a draft activation is in progress, so that CreateAttachmentsHandler and UpdateAttachmentsHandler know to preserve readonly fields.
The current API is:
threadLocalSetter.set(true, context::proceed); // set flagthreadLocalSetter.get(); // read flag
The boolean true and generic method names carry no semantic meaning at the call site.
Proposed Change
Rename the class to ActivationContext (or similar) and the methods to:
ActivationContext.markAsDraftActivation(context::proceed); // set flagActivationContext.isDraftActivation(); // read flag
This makes the intent clear without needing to read the implementation.
Activity