Skip to content

fix credentials NPE bug #1961

Merged
neozwu merged 3 commits intogoogleapis:masterfrom
neozwu:fix-credential-npe
Apr 24, 2017
Merged

fix credentials NPE bug #1961
neozwu merged 3 commits intogoogleapis:masterfrom
neozwu:fix-credential-npe

Conversation

@neozwu
Copy link
Copy Markdown
Contributor

@neozwu neozwu commented Apr 21, 2017

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 21, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.01%) to 80.816% when pulling c3529a4 on neozwu:fix-credential-npe into fb68318 on GoogleCloudPlatform:master.

// todo(mziccard): ChannelProvider should support null/absent credentials for testing
if (options.getHost().contains("localhost")
|| options.getCredentials().equals(NoCredentials.getInstance())) {
|| options.credentialIsNoCredentialInstance()) {

This comment was marked as spam.

This comment was marked as spam.

@neozwu
Copy link
Copy Markdown
Contributor Author

neozwu commented Apr 24, 2017

@garrettjonesgoogle PTAL

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.06%) to 80.89% when pulling c4ed11e on neozwu:fix-credential-npe into fb68318 on GoogleCloudPlatform:master.

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor

I think I would prefer to add an equals method into NoCredentials which checks equality of classes. Note that NoCredentials is serializable; I feel like it's safer to not assume the singleton will be perfect, just in case. Also, using equals allows for changing comparison logic later inside of NoCredentials. Then, go back to the code that looks like:

NoCredentials.getInstance().equals(options.getCredentials())

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor

LGTM after tests pass

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.07%) to 80.896% when pulling 8d45c29 on neozwu:fix-credential-npe into fb68318 on GoogleCloudPlatform:master.

@neozwu neozwu merged commit ae3c787 into googleapis:master Apr 24, 2017
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
* deps: update arrow.version to v11

* 🦉 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>
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
🤖 I have created a release *beep* *boop*
---


## [2.31.0](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.30.0...v2.31.0) (2023-02-08)


### Features

* Add isDone to JsonWriter to indicate a JsonWriter is no longer usable and needs to be recreated. ([#1978](https://togithub.com/googleapis/java-bigquerystorage/issues/1978)) ([dc07ed8](https://togithub.com/googleapis/java-bigquerystorage/commit/dc07ed84778028f149cab3883af9bb9a7929efd1))
* Add isUserClosed to indicate that user explicitly closed the StreamWriter ([#1983](https://togithub.com/googleapis/java-bigquerystorage/issues/1983)) ([abd6627](https://togithub.com/googleapis/java-bigquerystorage/commit/abd66274abca2315739c1b388dd363e107baad85))


### Dependencies

* Update arrow.version to v11 (major) ([#1961](https://togithub.com/googleapis/java-bigquerystorage/issues/1961)) ([c13ab23](https://togithub.com/googleapis/java-bigquerystorage/commit/c13ab23a96d72d5087653ebaf0a0635863a526a9))
* Update dependency com.google.cloud:google-cloud-bigquery to v2.21.0 ([#1956](https://togithub.com/googleapis/java-bigquerystorage/issues/1956)) ([6a1d783](https://togithub.com/googleapis/java-bigquerystorage/commit/6a1d783b80bdd0e1846ee667e2a15d41e3f6980f))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.2.0 ([#1974](https://togithub.com/googleapis/java-bigquerystorage/issues/1974)) ([8e2c1e3](https://togithub.com/googleapis/java-bigquerystorage/commit/8e2c1e326d6a65ba814ef826cfcb98c58395f01f))
* Update dependency org.apache.arrow:arrow-memory-netty to v11 ([#1962](https://togithub.com/googleapis/java-bigquerystorage/issues/1962)) ([48abc75](https://togithub.com/googleapis/java-bigquerystorage/commit/48abc75cdd2c372751790c197b83cf3aa59f1055))
* Update dependency org.apache.arrow:arrow-vector to v11 ([#1963](https://togithub.com/googleapis/java-bigquerystorage/issues/1963)) ([e872723](https://togithub.com/googleapis/java-bigquerystorage/commit/e87272323a0267771f3ffbc857fbaf06c6656f90))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
…v6.89.0 (googleapis#1961)

* deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.89.0

* chore: update test cases and regenerate documentation

The Spanner client now also uses a multiplexed session to determine the database
dialect that is in use. This means that BatchCreateSessions is not being called
at all in many cases.

Also re-generates the connection properties documentation. The typo in the
description of the new connection property must be fixed in the Spanner
client, as the list here is generated based on the source in the client.

* chore: run code formatter

---------

Co-authored-by: Knut Olav Løite <koloite@gmail.com>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
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.

4 participants