GeezerVison is showing github.com — Make signUrl take long duration and TimeUnit parameter by mziccard · Pull Request #243 · googleapis/google-cloud-java
Conversation
This follows from #107.
This changes storage.signUrl method to take a long duration parameter and a TimeUnit parameter.
Javadocs and tests are updated.
To wrap accesses to the clock and unit-test storage.signUrl I added a TimeSource abstract class whose default implementation uses System.currentTimeMillis. This is inspired by Java8 Clock class and is meant to last until we switch to Java8. If we decide to merge this we could also consider moving TimeSource out of StorageOptions (possibly put it in gcloud-java-core?).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Add TimeSource abstract class to wrap clock functionalities (waiting for Java8 Clock)
- Add timeSource setter to StorageOptions builder and getter to StorageOptions
- Update StorageImplTest and ITStorageTest
- Update javadoc for Blob/Storage signUrl
|
Fixed all comments but adding implements Serializable to Clock (previously called TimeSource). See my comment above on that.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Nice. Fine with not making Clock implement Serializable and with its javadoc. see one comment above.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
aozarov
added a commit
that referenced
this pull request
Oct 13, 2015
Make signUrl take long duration and TimeUnit parameter
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 1, 2022
This PR was generated using Autosynth. 🌈
<details><summary>Log from Synthtool</summary>
```
2021-04-30 18:16:16,534 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-workflows/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-04-30 18:16:17,823 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/7a946217-a32d-4fbd-b489-28c70b1aa200/targets
- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 9, 2022
chore: pin versions of certifi and google-resumable-media
Source-Link: googleapis/synthtool@09c4fcd
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13
added a commit
that referenced
this pull request
Feb 24, 2026
* Javadoc publish kokoro job uses docpublisher
* Fix config path
* Fix site:stage config
* Move config to reporting
* Fix indent
chingor13
added a commit
that referenced
this pull request
Mar 12, 2026
* Javadoc publish kokoro job uses docpublisher
* Fix config path
* Fix site:stage config
* Move config to reporting
* Fix indent
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
api: storage
Issues related to the Cloud Storage API.
cla: yes
This human has signed the Contributor License Agreement.
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.
|