Skip to content

Migrate to JSpecify#396

Merged
jonatan-ivanov merged 2 commits intomainfrom
jspecify
Aug 7, 2025
Merged

Migrate to JSpecify#396
jonatan-ivanov merged 2 commits intomainfrom
jspecify

Conversation

@jonatan-ivanov
Copy link
Copy Markdown
Member

No description provided.

@jonatan-ivanov jonatan-ivanov added this to the 1.2.0-M1 milestone Jul 22, 2025
@jonatan-ivanov jonatan-ivanov added the enhancement A general enhancement label Jul 22, 2025
*/
public <V> ContextRegistry registerThreadLocalAccessor(String key, Supplier<V> getSupplier, Consumer<V> setConsumer,
Runnable resetTask) {
public <V extends @Nullable Object> ContextRegistry registerThreadLocalAccessor(String key, Supplier<V> getSupplier,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that V can be "nullable" which lets both the supplier return null and the consumer accept null OR it can be non-nullable which means both the supplier and the consumer must return non-null. Same for getValue and setValue.

Copy link
Copy Markdown
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me other than the one JavaDoc issue.

Comment thread context-propagation/src/main/java/io/micrometer/context/Nullable.java Outdated
@jonatan-ivanov jonatan-ivanov merged commit a7aad4b into main Aug 7, 2025
8 checks passed
@jonatan-ivanov jonatan-ivanov deleted the jspecify branch January 9, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants