google-wallet / passes-rest-samples

Server-side samples for the Google Pay API for Passes
Apache License 2.0
95 stars 49 forks source link

Removed redundant ResourceDefinitions null check #35

Closed Jawvig closed 2 years ago

Jawvig commented 2 years ago

The singleton resourceDefinitions is initialized at type construction time and so will never be null bey the time getInstance is called. This Change removes the redundant null check. On glancing at the original code it looked like a potential race condition with multiple possible instances being created.

Note that this pattern is repeated elsewhere, but I'm testing the water with this PR to see if you folks are open to community help before I put any more effort in.

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

ncalteen commented 2 years ago

Hello,

I apologize, but this repository is being archived and replaced by google-pay/wallet-samples going forward. If you still have a question, please open a new issue in that repository.

Thank you!