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
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