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 — blobInfo.toBuilder().build() is not equal to blobInfo · Issue #415 · googleapis/google-cloud-java

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

New issue
Copy link
New issue
Copy link
Closed
#416
Closed
blobInfo.toBuilder().build() is not equal to blobInfo#415
#416
Copy link
Assignees
mziccard
Labels
🚨 criticalP0 critical issue. Requires immediate fixapi: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@mziccard
mziccard
opened on Nov 24, 2015
Issue body actions

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().

Activity

  1. mziccard
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    on Nov 24, 2015
  2. mziccard
    self-assigned this
    on Nov 24, 2015
  3. aozarov commented on Nov 24, 2015

    @aozarov
    aozarov
    on Nov 24, 2015
    Contributor
    More actions

    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...

  4. mziccard commented on Nov 24, 2015

    @mziccard
    mziccard
    on Nov 24, 2015
    ContributorAuthor
    More actions

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

  5. eamonnmcmanus commented on Nov 24, 2015

    @eamonnmcmanus
    eamonnmcmanus
    on Nov 24, 2015
    Contributor
    More actions

    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.

  6. aozarov
    closed this as completedin #416on Nov 25, 2015
  7. aozarov commented on Nov 25, 2015

    @aozarov
    aozarov
    on Nov 25, 2015
    Contributor
    More actions

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

  8. yoshi-automation
    added
    🚨 criticalP0 critical issue. Requires immediate fix
    triage meI really want to be triaged.
    on Apr 6, 2020
  9. github-actions
    added 4 commits that reference this issue on Jun 23, 2022

    chore(main): release 0.10.2 (#415)

    277f806

    chore: regenerate README (googleapis#415)

    2efc233

    deps: update actions/github-script action to v6 (#415)

    bb63bea

    chore(main): release 2.1.7 (#416)

    a485141
  10. github-actions
    added a commit that references this issue on Jul 14, 2022

    docs(samples): Refactoring search package (#415)

    f7e3b16
  11. github-actions
    added a commit that references this issue on Aug 9, 2022

    chore(main): release 2.4.0 (#486)

    4e6e41e
  12. github-actions
    added a commit that references this issue on Oct 6, 2022

    chore(deps): update dependency com.google.cloud:google-cloud-video-tr…

    495a0e1
  13. github-actions
    added a commit that references this issue on Nov 9, 2022

    build(deps): update dependency com.google.cloud:google-cloud-shared-c…

    c6f85f9
  14. suztomo
    added a commit that references this issue on Feb 1, 2023

    chore: Remove CLIRR job as required (#415)

    74d14e2
  15. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore: Re-generated to pick up changes from googleapis (#415)

    6239017
  16. chingor13
    added 2 commits that reference this issue on Jan 6, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    d5e79c8

    chore: release 0.121.0 (#416)

    4c1299e
  17. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v20.…

    a1ea05f
  18. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore: Re-generated to pick up changes from googleapis (googleapis#415)

    2b8dfd3
  19. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore: regenerate README (#415)

    fcdaedd

    chore: regenerate README (#415)

    923c62c
  20. benjaminp
    added 2 commits that reference this issue on Jul 13, 2026

    deps: update dependency com.google.cloud:google-cloud-conformance-tes…

    8bf6af2

    chore: release 1.16.0 (googleapis#444)

    efeaf21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

🚨 criticalP0 critical issue. Requires immediate fixapi: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.