docs: note that INatsJSMsg<T>.Metadata is nullable before accessing its properties#1080
Merged
Merged
Conversation
…d before use Co-authored-by: mtmk <386903+mtmk@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on consumer info usage warnings PR
docs: note that INatsJSMsg<T>.Metadata is nullable before accessing its properties
Feb 26, 2026
mtmk
approved these changes
Feb 26, 2026
mtmk
marked this pull request as ready for review
February 26, 2026 13:02
mtmk
added a commit
that referenced
this pull request
Feb 27, 2026
* Add consumer info usage warnings Add performance warnings about frequent `ConsumerInfo` API calls. * Add GitHub Actions workflow for docs preview deployment via Netlify * Update src/NATS.Client.JetStream/INatsJSContext.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/NATS.Client.JetStream/INatsJSConsumer.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Potential fix for code scanning alert no. 24: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * docs: note that INatsJSMsg<T>.Metadata is nullable before accessing its properties (#1080) * Initial plan * docs: clarify that INatsJSMsg.Metadata is nullable and must be checked before use Co-authored-by: mtmk <386903+mtmk@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mtmk <386903+mtmk@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: mtmk <386903+mtmk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The XML doc comment on
RefreshAsyncsuggested usingINatsJSMsg<T>.Metadatato track consumer progress without noting that the property is nullable (NatsJSMsgMetadata?), which could mislead callers into accessingNumPending,NumDelivered,Sequence, orTimestampwithout a null check.Changes
INatsJSConsumer.cs: Updated theRefreshAsyncremarks to explicitly state thatMetadatais nullable and must be checked fornullbefore accessing any of its properties.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.