Connection and adjacent objects nullability markers.#1383
Merged
Conversation
scottf
commented
Aug 10, 2025
| */ | ||
| Message next(Duration maxWait) throws IOException, InterruptedException, JetStreamStatusCheckedException, JetStreamApiException; | ||
| @Nullable | ||
| Message next(@Nullable Duration maxWait) throws IOException, InterruptedException, JetStreamStatusCheckedException, JetStreamApiException; |
Contributor
Author
There was a problem hiding this comment.
I know it's weird to have the only parameter of a method be nullable, but I've annotated based on implementation and the underlying implementations handles if the value is not present.
| * @throws InterruptedException the connection is not connected | ||
| */ | ||
| void forceReconnect(ForceReconnectOptions options) throws IOException, InterruptedException; | ||
| void forceReconnect(@Nullable ForceReconnectOptions options) throws IOException, InterruptedException; |
Contributor
Author
There was a problem hiding this comment.
Ditto nullable on only parameter
| serverName = readString(jv, SERVER_NAME, "N/A"); | ||
| version = readString(jv, VERSION, "0.0.0"); | ||
| go = readString(jv, GO, "0.0.0"); | ||
| host = readString(jv, HOST, "N/A"); |
Contributor
Author
There was a problem hiding this comment.
defaults were added so getters can be marked as @NonNull
|
|
||
| if (bytesRead > 0) { | ||
| connection.getNatsStatistics().registerRead(bytesRead); | ||
| connection.getStatisticsCollector().registerRead(bytesRead); |
Contributor
Author
There was a problem hiding this comment.
rename of non-public api
MauriceVanVeen
approved these changes
Aug 11, 2025
| } | ||
|
|
||
| KeyValueEntry existingOnly(KeyValueEntry kve) { | ||
| Debug.info("_get", kve); |
Contributor
Author
There was a problem hiding this comment.
Nope, which is why I don't commit the Debug class. I see now that the build failed.
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.
No description provided.