Issue Details
With the Google Ads Java SDK 45.0.0 release, some transient libraries were migrated to use JSpecify annotations by simply just adding @NullMarked to the classes.
Dependencies
- com.google.api-ads:google-ads:45.0.0 →
- com.google.auth:google-auth-library-oauth2-http
Reproducer
This no longer works:
- Code that implements com.google.auth.oauth2.TokenStore.
- Code that passes a null baseUri to com.google.auth.oauth2.UserAuthorizer#getAuthorizationUrl or com.google.auth.oauth2.UserAuthorizer#getAndStoreCredentialsFromCode.
Behavior
The update of google-auth-library-oauth2-http to 1.50.0 as a transitive dependency of the Google Ads Java SDK caused the problem: googleads/google-ads-java#904
Expected
- The return value of com.google.auth.oauth2.TokenStore#load value should be
@Nullable, because null is the expected result for "no token found".
- The baseUri parameter in com.google.auth.oauth2.UserAuthorizer#getAuthorizationUrl and com.google.auth.oauth2.UserAuthorizer#getAndStoreCredentialsFromCode should be
@Nullable, because it is just required if using relative callback URIs.
- JSpecify migration made reasonable by checking what needs
@Nullable and what does not.
Issue Details
With the Google Ads Java SDK 45.0.0 release, some transient libraries were migrated to use JSpecify annotations by simply just adding
@NullMarkedto the classes.Dependencies
Reproducer
This no longer works:
Behavior
The update of google-auth-library-oauth2-http to 1.50.0 as a transitive dependency of the Google Ads Java SDK caused the problem: googleads/google-ads-java#904
Expected
@Nullable, because null is the expected result for "no token found".@Nullable, because it is just required if using relative callback URIs.@Nullableand what does not.