Skip to content

Stream Name cannot be null #1377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Stream Name cannot be null #1377

wants to merge 1 commit into from

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Jul 29, 2025

StreamName was annotated as @NonNull

@NonNull
public String getName() {
    return name;
}

This is actually correct, but under the covers...

  • The builder allowed null but this was handled in JetStreamManagement when adding or updating a stream, the name was valdiate. This has been moved to the builder. Same type of exception and same message, so is backward compatible, and should have no practical issues for users, since it's still the same error, just on build(...) instead of addStream or updateStream, which is called with a built StreamConfiguration.
  • The StreamInfo creation always read the "config" field from an incoming response to getStreamInfo(). This was a problem because if the request was an error, there is no StreamConfiguration in the response. So this is fixed by checking the field first.

Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants