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: @Nullable annotations on builder methods #3222

Merged
merged 5 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Fix @nullable annotations on builder methods
This fixes errors in the latest versions of AutoValue

```
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java:225: error: [AutoValueBuilderSetterNullable] Setter methods always return the Builder so @nullable is not appropriate
    public abstract Builder setUseReadAPI(Boolean useReadAPI);
                            ^
```
  • Loading branch information
cushon committed Mar 29, 2024
commit 6b730fd791cf6c102acb8e94eceb0fdcc298b0d8
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ Builder withDefaultValues() {
*
* @param useReadAPI or {@code true} for none
*/
@Nullable
public abstract Builder setUseReadAPI(Boolean useReadAPI);
public abstract Builder setUseReadAPI(@Nullable Boolean useReadAPI);
PhongChuong marked this conversation as resolved.
Show resolved Hide resolved

/**
* Sets how long to wait for the query to complete, in milliseconds, before the request times
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.google.auto.value.AutoValue;
import java.io.Serializable;
import javax.annotation.Nullable;

/** Represents BigQueryStorage Read client connection information. */
@AutoValue
Expand All @@ -31,21 +30,18 @@ public abstract static class Builder {
* Sets the total row count to page row count ratio used to determine whether to us the
* BigQueryStorage Read client to fetch result sets after the first page.
*/
@Nullable
public abstract Builder setTotalToPageRowCountRatio(Long ratio);
PhongChuong marked this conversation as resolved.
Show resolved Hide resolved

/**
* Sets the minimum number of table rows in the query results used to determine whether to us
* the BigQueryStorage Read client to fetch result sets after the first page.
*/
@Nullable
public abstract Builder setMinResultSize(Long numRows);
PhongChuong marked this conversation as resolved.
Show resolved Hide resolved

/**
* Sets the maximum number of table rows allowed in buffer before streaming them to the
* BigQueryResult.
*/
@Nullable
public abstract Builder setBufferSize(Long bufferSize);
PhongChuong marked this conversation as resolved.
Show resolved Hide resolved

/** Creates a {@code ReadClientConnectionConfiguration} object. */
Expand Down
Loading