-
Notifications
You must be signed in to change notification settings - Fork 182
Connection and adjacent objects nullability markers. #1383
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
Conversation
| */ | ||
| Message next(Duration maxWait) throws IOException, InterruptedException, JetStreamStatusCheckedException, JetStreamApiException; | ||
| @Nullable | ||
| Message next(@Nullable Duration maxWait) throws IOException, InterruptedException, JetStreamStatusCheckedException, JetStreamApiException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaults were added so getters can be marked as @NonNull
|
|
||
| if (bytesRead > 0) { | ||
| connection.getNatsStatistics().registerRead(bytesRead); | ||
| connection.getStatisticsCollector().registerRead(bytesRead); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename of non-public api
MauriceVanVeen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| } | ||
|
|
||
| KeyValueEntry existingOnly(KeyValueEntry kve) { | ||
| Debug.info("_get", kve); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, which is why I don't commit the Debug class. I see now that the build failed.
No description provided.