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

InstanceId.of(String, String) accepts null project, but InstanceId.equals doesn't handle null #145

sebright opened this issue Apr 13, 2020 · 0 comments · Fixed by #159
api: spanner priority: p2 type: bug


Copy link

@sebright sebright commented Apr 13, 2020

InstanceId.equals threw a NullPointerException when I accidentally set the project to null. I would have expected the exception to be thrown earlier, in the factory method.

Code example

public void test() {
  InstanceId instance1 = InstanceId.of("project", "instance-1");
  InstanceId instance2 = InstanceId.of(null, "instance-2");

Stack trace


EDIT: I used google-cloud-spanner version 1.52.0.

@product-auto-label product-auto-label bot added the api: spanner label Apr 13, 2020
@yoshi-automation yoshi-automation added triage me 🚨 labels Apr 13, 2020
@skuruppu skuruppu added type: bug and removed 🚨 triage me labels Apr 20, 2020
@skuruppu skuruppu added the priority: p2 label Apr 20, 2020
olavloite added a commit that referenced this issue Apr 20, 2020
gcf-merge-on-green bot pushed a commit that referenced this issue Apr 22, 2020
🤖 I have created a release \*beep\* \*boop\* 
## [1.53.0]( (2020-04-22)

### Features

* optimize maintainer to let sessions be GC'ed instead of deleted ([#135]( ([d65747c](

### Bug Fixes

* assign unique id's per test case ([#129]( ([a553b6d](
* check for not null input for Id classes ([#159]( ([ecf5826](, closes [#145](
* clean up test instance if creation failed ([#162]( ([ff571e1](
* fix flaky test and remove warnings ([#153]( ([d534e35](, closes [#146](
* increase test timeout and remove warnings ([#160]( ([63a6bd8](, closes [#158](
* retry non-idempotent long-running RPCs ([#141]( ([4669c02](
* retry restore if blocked by pending restore ([#119]( ([220653d](, closes [#118](
* StatementParser did not accept multiple query hints ([#170]( ([ef41a6e](, closes [#163](
* wait for initialization to finish before test ([#161]( ([fe434ff](, closes [#146](

### Performance Improvements

* increase sessions in the pool in batches ([#134]( ([9e5a1cd](
* prepare sessions with r/w tx in-process ([#152]( ([2db27ce](, closes [#151](

### Dependencies

* update core dependencies ([#109]( ([5753f1f](
* update core dependencies ([#132]( ([77c1558](
* update dependency to v1.9.0 ([#127]( ([b2c744f](
* update dependency to v29 ([#147]( ([3fe3ae0](
* update dependency io.grpc:grpc-bom to v1.29.0 ([#164]( ([2d2ce5c](
* update dependency org.threeten:threetenbp to v1.4.3 ([#120]( ([49d1abc](

This PR was generated with [Release Please](
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api: spanner priority: p2 type: bug
None yet

Successfully merging a pull request may close this issue.

4 participants