Skip to content

Commit

Permalink
Fix: @nullable annotations on builder methods (#3222)
Browse files Browse the repository at this point in the history
* 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);
                            ^
```

* 🦉 Updates from OwlBot post-processor

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

* Review comments

* Review comments

* 🦉 Updates from OwlBot post-processor

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

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
cushon and gcf-owl-bot[bot] authored Apr 24, 2024
1 parent 94b5b43 commit 0c5eed1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ implementation 'com.google.cloud:google-cloud-bigquery'
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-bigquery:2.38.2'
implementation 'com.google.cloud:google-cloud-bigquery:2.39.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.38.2"
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.39.0"
```
<!-- {x-version-update-end} -->

Expand Down Expand Up @@ -351,7 +351,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquery/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquery.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.38.2
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.39.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ Builder withDefaultValues() {
*
* @param useReadAPI or {@code true} for none
*/
@Nullable
public abstract Builder setUseReadAPI(Boolean useReadAPI);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,34 @@ 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);

/**
* 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);

/**
* Sets the maximum number of table rows allowed in buffer before streaming them to the
* BigQueryResult.
*/
@Nullable
public abstract Builder setBufferSize(Long bufferSize);

/** Creates a {@code ReadClientConnectionConfiguration} object. */
public abstract ReadClientConnectionConfiguration build();
}

/** Returns the totalToPageRowCountRatio in this configuration. */
@Nullable
public abstract Long getTotalToPageRowCountRatio();

/** Returns the minResultSize in this configuration. */
@Nullable
public abstract Long getMinResultSize();

/** Returns the bufferSize in this configuration. */
@Nullable
public abstract Long getBufferSize();

public abstract Builder toBuilder();
Expand Down

0 comments on commit 0c5eed1

Please sign in to comment.