-
Notifications
You must be signed in to change notification settings - Fork 2k
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
SDK version bump + Null context breaking change fix. #21655
Conversation
@@ -586,6 +614,10 @@ public DigitalTwinsServiceVersion getServiceVersion() { | |||
} | |||
|
|||
Mono<Response<Void>> deleteRelationshipWithResponse(String digitalTwinId, String relationshipId, DeleteRelationshipOptions options, Context context) { | |||
if (context == null) { |
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.
since these are package private methods, they can be called from elsewhere within the namespace so we do a null check and assign a default value to all of them.
...ure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java
Show resolved
Hide resolved
() -> listIncomingRelationshipsFirstPageAsync(digitalTwinId, context != null ? context : Context.NONE), | ||
nextLink -> listIncomingRelationshipsNextSinglePageAsync(nextLink, context != null ? context : Context.NONE )); |
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.
nit: can do the check just once
if (context == null) {
context = Context.NONE;
}
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 tried but the parameter in the lambda expression needs to be final :)
1.0.2
in which a user could no longer pass downnull
for thecontext
parameter in the synchronous APIs. We now use Context.NONE as the default value even if the user passes downnull