Skip to content
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

blobInfo.toBuilder().build() is not equal to blobInfo #415

Closed
mziccard opened this issue Nov 24, 2015 · 4 comments · Fixed by #416
Closed

blobInfo.toBuilder().build() is not equal to blobInfo #415

mziccard opened this issue Nov 24, 2015 · 4 comments · Fixed by #416
Assignees
Labels
api: storage Issues related to the Cloud Storage API. 🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@mziccard
Copy link
Contributor

We have this situation:

BlobInfo blobInfo = BlobInfo.builder(BlobId.of("b", "n")).build();
assertEquals(blobInfo, blobInfo.toBuilder().build()); // This fails!

This is due to the fact that toBuilder uses builder's setters that initialize (some of them) fields to Data.nullOf() if null is passed. This can be fixed by checking for null before calling setters in toBuilder().

@mziccard mziccard added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: storage Issues related to the Cloud Storage API. labels Nov 24, 2015
@mziccard mziccard self-assigned this Nov 24, 2015
@aozarov
Copy link
Contributor

aozarov commented Nov 24, 2015

Good catch. How about adding to BlobInfo.Builder a constructor that gets BlobInfo and copy the fields value directly? We could also add a static builder method that accepts BlobInfo...

@mziccard
Copy link
Contributor Author

Adding a constructor to the builder that takes BlobInfo makes sense to me.

@eamonnmcmanus
Copy link

Have you considered using AutoValue here? It seems as if it would simplify BlobInfo greatly. It would also have a much more performant equals method than one that converts into protos before comparing.

@aozarov
Copy link
Contributor

aozarov commented Nov 25, 2015

I think using AutoValue is a fine idea that should considered but tracked and dealt with separately.
Created #418

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
github-actions bot pushed a commit that referenced this issue Jun 23, 2022
🤖 I have created a release *beep* *boop*
---


## [0.10.2](googleapis/java-analytics-admin@v0.10.1...v0.10.2) (2022-06-23)


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#414](googleapis/java-analytics-admin#414)) ([0d554d7](googleapis/java-analytics-admin@0d554d7))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this issue Jun 29, 2022
This PR was generated using Autosynth. 🌈


<details><summary>Log from Synthtool</summary>

```
2021-03-25 19:55:35,956 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-resourcemanager/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-03-25 19:55:37,205 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/8cb458b7-2135-4eda-841c-0003e4ae9ff8/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
github-actions bot pushed a commit that referenced this issue Jul 1, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/github-script](https://togithub.com/actions/github-script) | action | major | `v5` -> `v6` |

---

### Release Notes

<details>
<summary>actions/github-script</summary>

### [`v6`](https://togithub.com/actions/github-script/compare/v5...v6)

[Compare Source](https://togithub.com/actions/github-script/compare/v5...v6)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-workflows).
github-actions bot pushed a commit that referenced this issue Jul 1, 2022
🤖 I have created a release *beep* *boop*
---


### [2.1.7](googleapis/java-workflows@v2.1.6...v2.1.7) (2022-02-11)


### Dependencies

* update actions/github-script action to v6 ([#415](googleapis/java-workflows#415)) ([bb63bea](googleapis/java-workflows@bb63bea))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Jul 14, 2022
* Update README

* the bash scripts are added

* Update README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Update user_environment_setup.sh

* Update user_import_data_to_catalog.sh

* Update README.md

* Refactoring search package.

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: tetiana-karasova <[email protected]>
Co-authored-by: t-karasova <[email protected]>
Co-authored-by: t-karasova <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Karl Weinmeister <[email protected]>
github-actions bot pushed a commit that referenced this issue Aug 9, 2022
🤖 I have created a release *beep* *boop*
---


## [2.4.0](googleapis/java-retail@v2.3.0...v2.4.0) (2022-08-09)


### Features

* allow adding labels in search requests ([2be6d88](googleapis/java-retail@2be6d88))
* allow adding labels in search requests ([2be6d88](googleapis/java-retail@2be6d88))
* allow disabling spell check in search requests ([2be6d88](googleapis/java-retail@2be6d88))
* allow disabling spell check in search requests ([2be6d88](googleapis/java-retail@2be6d88))
* allow enabling recommendation filtering on custom attributes ([2be6d88](googleapis/java-retail@2be6d88))
* allow enabling recommendation filtering on custom attributes ([2be6d88](googleapis/java-retail@2be6d88))
* allow returning min/max values on search numeric facets ([2be6d88](googleapis/java-retail@2be6d88))
* allow returning min/max values on search numeric facets ([2be6d88](googleapis/java-retail@2be6d88))
* allow skiping default branch protection when doing product full import ([2be6d88](googleapis/java-retail@2be6d88))
* allow to return min/max values on search numeric facets ([2be6d88](googleapis/java-retail@2be6d88))
* allow to use serving configs as an alias of placements ([2be6d88](googleapis/java-retail@2be6d88))
* allow using serving configs as an alias of placements ([2be6d88](googleapis/java-retail@2be6d88))
* allow using serving configs as an alias of placements ([2be6d88](googleapis/java-retail@2be6d88))
* new model service to manage recommendation models ([#497](googleapis/java-retail#497)) ([2be6d88](googleapis/java-retail@2be6d88))
* return output BigQuery table on product / event export response ([2be6d88](googleapis/java-retail@2be6d88))
* return output BigQuery table on product / event export response ([2be6d88](googleapis/java-retail@2be6d88))
* support case insensitive match on search facets ([2be6d88](googleapis/java-retail@2be6d88))
* support case insensitive match on search facets ([2be6d88](googleapis/java-retail@2be6d88))
* support case insensitive match on search facets ([2be6d88](googleapis/java-retail@2be6d88))


### Bug Fixes

* enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-retail/issues/1485)) ([#487](googleapis/java-retail#487)) ([ff6af57](googleapis/java-retail@ff6af57))


### Documentation

* keep the API doc up-to-date with recent changes ([2be6d88](googleapis/java-retail@2be6d88))
* keep the API doc up-to-date with recent changes ([2be6d88](googleapis/java-retail@2be6d88))
* keep the API doc up-to-date with recent changes ([2be6d88](googleapis/java-retail@2be6d88))
* **samples:** Refactoring product package (CRUD) ([#417](googleapis/java-retail#417)) ([d0c5f39](googleapis/java-retail@d0c5f39))
* **samples:** Refactoring search package ([#415](googleapis/java-retail#415)) ([f7e3b16](googleapis/java-retail@f7e3b16))


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#499](googleapis/java-retail#499)) ([eb0b64d](googleapis/java-retail@eb0b64d))
* update dependency com.google.cloud:google-cloud-storage to v2.10.0 ([#504](googleapis/java-retail#504)) ([38ffa21](googleapis/java-retail@38ffa21))
* update dependency com.google.cloud:google-cloud-storage to v2.11.0 ([#507](googleapis/java-retail#507)) ([fdd05c6](googleapis/java-retail@fdd05c6))
* update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#509](googleapis/java-retail#509)) ([05f2d9b](googleapis/java-retail@05f2d9b))
* update dependency com.google.cloud:google-cloud-storage to v2.11.2 ([#510](googleapis/java-retail#510)) ([6dccbdf](googleapis/java-retail@6dccbdf))
* update dependency com.google.code.gson:gson to v2.9.1 ([#500](googleapis/java-retail#500)) ([4f864e8](googleapis/java-retail@4f864e8))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Oct 6, 2022
…anscoder to v1.2.5 (#415)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-video-transcoder](https://togithub.com/googleapis/java-video-transcoder) ([source](https://togithub.com/googleapis/java-)) | `1.2.3` -> `1.2.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.2.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.2.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.2.5/compatibility-slim/1.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.2.5/confidence-slim/1.2.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-video-transcoder).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTcuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIxNy4wIn0=-->
github-actions bot pushed a commit that referenced this issue Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. 🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants