Add Reactor NPE warning to sdk-java-content-response rule#42
Merged
Conversation
Enhances the rule to warn that contentResponseOnWriteEnabled(false) causes NullPointerException in Project Reactor pipelines when using CosmosAsyncClient, since Reactor does not allow null signals (Reactive Streams Spec Rule 2.13). Includes incorrect/correct code examples and scopes the "When NOT to enable" section to synchronous CosmosClient only. Co-authored-by: TheovanKraay <24420698+TheovanKraay@users.noreply.github.com> Agent-Logs-Url: https://github.com/AzureCosmosDB/cosmosdb-agent-kit/sessions/6869109c-cd86-40d9-90ed-fd93499e38e1
Copilot
AI
changed the title
[WIP] Fix NullPointerException in reactive streams with contentResponseOnWriteEnabled(false)
Add Reactor NPE warning to sdk-java-content-response rule
Mar 23, 2026
Contributor
|
@copilot resolve branch conflicts or rebase and start again |
…rule and AGENTS.md
Contributor
Author
Resolved the merge conflicts with main in |
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.
SCOPE profile P08 found that
contentResponseOnWriteEnabled(false)withCosmosAsyncClientcausesNullPointerExceptiondeep in Reactor internals —getItem()returnsnull, which violates Reactive Streams Spec Rule 2.13 (no null signals). The existing rule's "When NOT to enable" section recommendedfalsefor high-throughput writes without warning about this.Changes
CosmosClientonlyAGENTS.mdvianpm run buildIncorrect pattern (causes NPE)
Safe alternatives
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.