-
Notifications
You must be signed in to change notification settings - Fork 702
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
Deprecate BatchRequest constructor #1333
Deprecate BatchRequest constructor #1333
Conversation
google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java
Outdated
Show resolved
Hide resolved
@@ -232,6 +232,7 @@ public final BatchRequest batch() { | |||
* @return newly created Batch request | |||
*/ | |||
public final BatchRequest batch(HttpRequestInitializer httpRequestInitializer) { | |||
@SuppressWarnings("deprecated") | |||
BatchRequest batch = |
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.
Should we migrate this to the new API?
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.
This one is the method that users should be using that sets the batch path.
* declared by the service configuration. | ||
*/ | ||
private static final String GLOBAL_BATCH_ENDPOINT = "https://www.googleapis.com/batch"; | ||
private static final String GLOBAL_BATCH_ENDPOINT_WARNING = "You are using the global batch " |
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.
Maybe we can also link to javadoc or a more verbose example?
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.
We would like to migrate the docs off of developers.google.com for these clients, so I migrated the batching and media upload/download docs to the main README in #1334. That will give us a place to target with this message.
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.
Added a link to the new docs section in the warning message.
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
* Deprecate the BatchRequest public constructor * Update Javadoc sample for batch request * Log a warning if a user is using the global batch endpoint * Fix equality check for Strings * Swap equals comparison to avoid possible NPE * Add URL to visit in the warning message
Users should obtain a
BatchRequest
instance via their client'sbatch(HttpRequestInitializer)
method.