GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Deprecate BatchRequest constructor by chingor13 · Pull Request #1333 · googleapis/google-api-java-client

Conversation

@chingor13

@chingor13 chingor13 commented Jun 27, 2019

Copy link
Copy Markdown
Collaborator

Users should obtain a BatchRequest instance via their client's batch(HttpRequestInitializer) method.

  • Deprecates the public BatchRequest constructor
  • Logs a WARNING message if you try to make a request against the global batch endpoint.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chingor13 added 4 commits June 27, 2019 09:07
@chingor13
Deprecate the BatchRequest public constructor
243255b
@chingor13
Update Javadoc sample for batch request
2bfea7b
@chingor13
Log a warning if a user is using the global batch endpoint
323c7bc
@chingor13
Fix equality check for Strings
b794af5
@chingor13
chingor13 requested a review from a team June 27, 2019 16:32
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 27, 2019
@chingor13
chingor13 requested a review from JesseLovelace June 27, 2019 18:15
kolea2
kolea2 reviewed Jul 1, 2019
View reviewed changes
Comment thread google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

kolea2
kolea2 reviewed Jul 1, 2019
View reviewed changes
Comment thread ...api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClient.java
*/
public final BatchRequest batch(HttpRequestInitializer httpRequestInitializer) {
@SuppressWarnings("deprecated")
BatchRequest batch =

@kolea2 kolea2 Jul 1, 2019

Copy link
Copy Markdown

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chingor13 chingor13 Jul 1, 2019

Copy link
Copy Markdown
Collaborator Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kolea2
kolea2 reviewed Jul 1, 2019
View reviewed changes
Comment thread google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java
* 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 "

@kolea2 kolea2 Jul 1, 2019

Copy link
Copy Markdown

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chingor13 chingor13 Jul 1, 2019

Copy link
Copy Markdown
Collaborator Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kolea2 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@chingor13 chingor13 Jul 1, 2019

Copy link
Copy Markdown
Collaborator Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chingor13
Swap equals comparison to avoid possible NPE
74fef56
kolea2
kolea2 approved these changes Jul 1, 2019
View reviewed changes
@chingor13
Add URL to visit in the warning message
f99668f
@chingor13
chingor13 merged commit d68a51a into googleapis:master Jul 1, 2019
@chingor13
chingor13 deleted the deprecate-batch-contructor branch July 1, 2019 19:50
@chingor13 chingor13 mentioned this pull request Jul 1, 2019
Release google-api-java-client v1.30.2 #1335
Merged
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
1720b2f
* 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
@chingor13 chingor13 mentioned this pull request Jul 1, 2019
Release google-api-java-client v1.29.3 #1337
Merged
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
07d2437
* 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
@chingor13 chingor13 mentioned this pull request Jul 1, 2019
Release google-api-java-client v1.28.1 #1338
Merged
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
0a5274d
* 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
@chingor13 chingor13 mentioned this pull request Jul 1, 2019
Release google-api-java-client v1.27.1 #1339
Merged
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
c693f66
* 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
@chingor13 chingor13 mentioned this pull request Jul 1, 2019
Release google-api-java-client v1.26.1 #1340
Merged
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
8cdc416
* 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
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
5206cd4
* 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
chingor13 added a commit that referenced this pull request Jul 1, 2019
@chingor13
Deprecate BatchRequest constructor (#1333)
4a194b4
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JesseLovelace JesseLovelace Awaiting requested review from JesseLovelace
1 more reviewer
@kolea2 kolea2 kolea2 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@chingor13 @kolea2 @googlebot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.