Skip to content

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

@mziccard

Description

@mziccard

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

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: 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