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

fix: unnecessary boxed primitives in AutoValue classes #3460

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion google-cloud-bigquery/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,9 @@
<className>com/google/cloud/bigquery/StandardTableDefinition*</className>
<method>*BigLakeConfiguration(*)</method>
</difference>
</differences>
<difference>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<differenceType>7005</differenceType>
<differenceType>7013</differenceType>

It looks like it's now complaining about a new abstract method, I assume on the theory that subclasses would have to implement it. Given that the only subclass here will be the one generated by AutoValue (I hope :)), we should be able to suppress that, too.

Since the old method continues to exist in this iteration of the PR, that suppression can replace the old one from the time of the method removal. With that change, JOB_TYPE=clirr .kokoro/build.sh appears to pass.

<differenceType>7005</differenceType>
<className>com/google/cloud/bigquery/TableResult*</className>
<method>*setTotalRows(*)</method>
</difference>
</differences>
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,18 @@ public abstract static class Builder {
* Sets the total number of rows in the complete result set, which can be more than the number
* of rows in the first page of results returned by {@link #getValues()}.
*/
public abstract TableResult.Builder setTotalRows(Long totalRows);
public abstract TableResult.Builder setTotalRows(long totalRows);

/**
* Sets the total number of rows in the complete result set, which can be more than the number
* of rows in the first page of results returned by {@link #getValues()}.
*
* @deprecated use {@link setTotalRows(long)} instead.
*/
@Deprecated
public TableResult.Builder setTotalRows(Long totalRows) {
return setTotalRows((long) totalRows);
}

public abstract TableResult.Builder setJobId(JobId jobId);

Expand Down
Loading