GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix credentials NPE bug by neozwu · Pull Request #1961 · googleapis/google-cloud-java

Conversation

@neozwu

@neozwu neozwu commented Apr 21, 2017

Copy link
Copy Markdown
Contributor

#1565

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@neozwu
fix credentials NPE bug googleapis#1565
c3529a4
@neozwu
neozwu requested a review from garrettjonesgoogle April 21, 2017 16:51
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 21, 2017
@coveralls

coveralls commented Apr 21, 2017

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garrettjonesgoogle
garrettjonesgoogle requested a review from vam-google April 21, 2017 23:37
garrettjonesgoogle
garrettjonesgoogle reviewed Apr 22, 2017
View reviewed changes
Comment thread google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java Outdated
// 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.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neozwu
use object reference equality for Singleton object
c4ed11e
@neozwu

neozwu commented Apr 24, 2017

Copy link
Copy Markdown
Contributor Author

@garrettjonesgoogle PTAL

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Apr 24, 2017

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garrettjonesgoogle

garrettjonesgoogle commented Apr 24, 2017

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neozwu
implement equals() method for NoCredentials class
8d45c29
@garrettjonesgoogle

garrettjonesgoogle commented Apr 24, 2017

Copy link
Copy Markdown
Contributor

LGTM after tests pass

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Apr 24, 2017

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neozwu
neozwu merged commit ae3c787 into googleapis:master Apr 24, 2017
This was referenced Apr 24, 2017
Cloud Logging library does not work on Java Flex Compat #1595
Closed
ServiceOptions.getCredentials can return null and cause NPE in Logging and PubSub #1565
Closed
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
@renovate-bot @gcf-owl-bot
deps: update arrow.version to v11 (major) (#1961)
c13ab23
* 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
@release-please
chore(main): release 2.31.0 (#1979)
a1734e7
🤖 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
@renovate-bot @olavloite
deps: update dependency com.google.cloud:google-cloud-spanner-bom to …
0553552
…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 <[email protected]>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
@renovate-bot
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
235c5d7
…onfig to v1.7.6 (#1961)
meltsufin pushed a commit that referenced this pull request May 1, 2026
@renovate-bot
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
daa6e5c
…onfig to v1.7.6 (#1961)
meltsufin pushed a commit that referenced this pull request May 2, 2026
@renovate-bot
deps: update dependency com.google.api.grpc:proto-google-cloud-trace-…
d4e6310
…v1 to v2.55.0 (#1961)
benjaminp pushed a commit to benjaminp/google-cloud-java that referenced this pull request Jul 13, 2026
@renovate-bot @gcf-owl-bot
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
618b018
…onfig to v1.6.0 (googleapis#1961)

* build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.6.0

* 🦉 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vam-google vam-google Awaiting requested review from vam-google
1 more reviewer
@garrettjonesgoogle garrettjonesgoogle garrettjonesgoogle left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@neozwu @coveralls @garrettjonesgoogle @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.