GeezerVison is showing github.com — signUrl returns a URI by jboynes · Pull Request #93 · googleapis/google-cloud-java
Conversation
Changes Storage#signUrl to return a URI rather than a URL as the value is typically given to another client to use rather than being resolved by the calling application.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Conflicts:
.gitignore
git-demo.iml
src/main/java/com/google/gcloud/RetryHelper.java
|
Both serialize and can transform to one another. Indeed Java URL implementation also provides functionality such as get the resource but the main reason I used it (vs URI) is that I feel it is much more popular/known (for various reasons including that URI came later) and corresponds to the GCS naming that is using URL.
When I search google "what is URL" or "what is URI" I get:
- URL ... "A URL is the fundamental network identification for any resource connected to the web"...
- URI ... "string of characters used to identify a name of a resource"..
So I think the main difference is that URL is more specific about being a "web" resource, which
is a better (more constraint) description in this case. Is the main argument against it is that in
Java they also chose to provide functionality to it? If so, I would have still kept it as URL (for naming
consistency and being more specific).
@jgeewax I don't have strong opinion in this case. Do you?
If we go with URI should we also update other part of the method (method name, java doc mention URL)...
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
If the distinction is as @jboynes said in his first comment, I agree that URI is the right choice. I also should note that AWS is using URIs also (take a look at AmazonS3URI)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I also agree that this PR should include changes to swap other uses of URL -> URI (if there are any).
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
From a practical standpoint, the java.net.URL class dates from the earliest versions of Java and is rubbish, so I would say that in general java.net.URI is preferred regardless of whether the thing in question is really a URI or a URL. But in that case I think the method name and documentation should also say URI. Otherwise it will be confusing.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Removed use of URL from the doc and renamed the method.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
We decided to keep the URL. see #14 for more details.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
benjaminp
pushed a commit
to benjaminp/google-cloud-java
that referenced
this pull request
Jul 13, 2026
* updated CHANGELOG.md [ci skip]
* updated README.md [ci skip]
* updated versions.txt [ci skip]
* updated google-cloud-bigtable-bom/pom.xml [ci skip]
* updated google-cloud-bigtable-emulator/pom.xml [ci skip]
* updated grpc-google-cloud-bigtable-admin-v2/pom.xml [ci skip]
* updated grpc-google-cloud-bigtable-v2/pom.xml [ci skip]
* updated proto-google-cloud-bigtable-admin-v2/pom.xml [ci skip]
* updated proto-google-cloud-bigtable-v2/pom.xml [ci skip]
* updated pom.xml [ci skip]
* updated google-cloud-bigtable/pom.xml [ci skip]
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|