Skip to content

spanner: Options: Fix null dereference, expand test coverage#3706

Merged
pongad merged 3 commits intogoogleapis:masterfrom
nithinsujir:optcovg
Sep 26, 2018
Merged

spanner: Options: Fix null dereference, expand test coverage#3706
pongad merged 3 commits intogoogleapis:masterfrom
nithinsujir:optcovg

Conversation

@nithinsujir
Copy link

Options coverage now at 100%

The equals code does not handle the comparison of two Options objects
where only one of them has either limit, pageSize or prefetchChunks
defined. The argument to Object.equals() takes for instance limit() and
this tries to deref the null to convert it to a long.

Add hasXXX() checks before calling Object.equals().

This patch also removes functions that will not be called since they are
internal.
This expands coverage of Options to 100%.
@nithinsujir nithinsujir requested a review from pongad as a code owner September 20, 2018 18:15
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 20, 2018
@nithinsujir nithinsujir changed the title WIP: Expand test coverage for Options Expand test coverage for Options Sep 20, 2018
@nithinsujir
Copy link
Author

R: @biswanag

@nithinsujir nithinsujir changed the title Expand test coverage for Options spanner: Options: Fix null dereference, expand test coverage Sep 20, 2018
Copy link
Contributor

@snehashah16 snehashah16 left a comment

Choose a reason for hiding this comment

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

LGTM

@pongad pongad merged commit d739242 into googleapis:master Sep 26, 2018
@nithinsujir nithinsujir deleted the optcovg branch September 26, 2018 15:49
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
In this PR:
- Setup logging module structure.
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
A follow up of #3706:
- Change the group id to `com.google.cloud` as it is a customer-facing
library.
- Add clirr and enforcer check in CI.
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
* feat: add default_isolation_level connection property

Add a `default_isolation_level` property for the Connection API.
This property will be used by the JDBC driver and PGAdapter to
set a default isolation level for all read/write transactions
that are executed by a connection.

Support for setting an isolation level for a single transaction
will be added in a follow-up pull request.

* feat: specify isolation level per transaction

Add an option to specify the isolation level for a single transaction.
This isolation level overrides the current default isolation level that
has been set for the connection. This option only has an effect for
read/write transactions.

* feat: support PostgreSQL isolation level statements

Adds support for PostgreSQL-dialect SQL statements for setting the isolation
level of a transaction.

* chore: generate libraries at Fri Mar 28 11:51:13 UTC 2025

---------

Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants