Skip to content

Check for null in Project.load()#520

Merged
ajkannan merged 2 commits intogoogleapis:masterfrom
ajkannan:check-null-load
Jan 4, 2016
Merged

Check for null in Project.load()#520
ajkannan merged 2 commits intogoogleapis:masterfrom
ajkannan:check-null-load

Conversation

@ajkannan
Copy link
Copy Markdown

@ajkannan ajkannan commented Jan 4, 2016

From discussion in #516

@ajkannan ajkannan added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: cloudresourcemanager Issues related to the Resource Manager API. labels Jan 4, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 4, 2016

This comment was marked as spam.

@ajkannan
Copy link
Copy Markdown
Author

ajkannan commented Jan 4, 2016

@mziccard fixed in place

@mziccard
Copy link
Copy Markdown
Contributor

mziccard commented Jan 4, 2016

@ajkannan What do you think about adding tests for Project's load and reload for the cases when the service returns null? Something like:

@Test
public void testLoadNull() {
  expect(resourceManager.get(PROJECT_INFO.projectId())).andReturn(null);
  replay(resourceManager);
  assertNull(Project.load(resourceManager, PROJECT_INFO.projectId()));
}

@ajkannan
Copy link
Copy Markdown
Author

ajkannan commented Jan 4, 2016

I added a test for reload already, and I think that covers load since reload uses load. But I can still add a test like the one you listed in case reload doesn't use load in the future.

@ajkannan
Copy link
Copy Markdown
Author

ajkannan commented Jan 4, 2016

@mziccard Added the testLoadNull test

@mziccard
Copy link
Copy Markdown
Contributor

mziccard commented Jan 4, 2016

Looks good to me!

ajkannan added a commit that referenced this pull request Jan 4, 2016
Check for null in Project.load()
@ajkannan ajkannan merged commit 0fa9b51 into googleapis:master Jan 4, 2016
@ajkannan ajkannan deleted the check-null-load branch January 4, 2016 21:05
github-actions bot pushed a commit that referenced this pull request Jun 21, 2022
…onfig to v1.5.0 (#520)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.4.0` -> `1.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-shared-config</summary>

### [`v1.5.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#&#8203;150-httpsgithubcomgoogleapisjava-shared-configcomparev140v150-2022-06-10)

[Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.4.0...v1.5.0)

##### Features

-   add build scripts for native image testing in Java 17 ([#&#8203;1440](https://togithub.com/googleapis/java-shared-config/issues/1440)) ([#&#8203;475](https://togithub.com/googleapis/java-shared-config/issues/475)) ([e4dfc1b](https://togithub.com/googleapis/java-shared-config/commit/e4dfc1ba29295158c78c8fcf94467d2a6a33538a))
-   to produce Java 8 compatible bytecode when using JDK 9+ ([2468276](https://togithub.com/googleapis/java-shared-config/commit/2468276145cdfe1ca911b52f765e026e77661a09))

##### Dependencies

-   update surefire.version to v3.0.0-m7 ([bbfe663](https://togithub.com/googleapis/java-shared-config/commit/bbfe66393af3e49612c9c1e4334ba39c133ea1d0))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-securitycenter-settings).
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this pull request Jun 29, 2022
Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:3796fe5c26bbf814f0a82a2eab2749b5710f87e7197dc011e5fa3c694e532462
github-actions bot pushed a commit that referenced this pull request Jul 14, 2022
…520)

* chore(deps): update dependency com.google.cloud:libraries-bom to v26

* 🦉 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>
github-actions bot pushed a commit that referenced this pull request Aug 9, 2022
🤖 I have created a release *beep* *boop*
---


## [0.14.3](googleapis/java-dialogflow-cx@v0.14.2...v0.14.3) (2022-07-26)


### Documentation

* **samples:** add try blocks to clean up resources in samples and sample tests ([#521](googleapis/java-dialogflow-cx#521)) ([6526525](googleapis/java-dialogflow-cx@6526525))
* **samples:** add webhook samples ([#479](googleapis/java-dialogflow-cx#479)) ([86a3ee5](googleapis/java-dialogflow-cx@86a3ee5))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this pull request Sep 15, 2022
…1575) (#520)

Source-Link: googleapis/synthtool@2e9ac19
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
suztomo pushed a commit that referenced this pull request Feb 1, 2023
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
…3.0 (#520)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.2.0` -> `20.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/compatibility-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/confidence-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
chingor13 pushed a commit that referenced this pull request Jan 6, 2026
🤖 I have created a release \*beep\* \*boop\*
---
### Updating meta-information for bleeding-edge SNAPSHOT release.
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
Update comments on protos to clarify size limits on values.

* Integrate Python GAPIC Microgenerator in googleapis.
This PR uses using documentai as an example.
Depends on googleapis/gapic-generator-python#402

PiperOrigin-RevId: 309824146

Source-Author: Google APIs <[email protected]>
Source-Date: Mon May 4 15:06:44 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb
Source-Link: googleapis/googleapis@e0f9d9e

* fix(python): use python installed by pyenv for bazel (#520)

Source-Author: Jeff Ching <[email protected]>
Source-Date: Mon May 4 15:52:28 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: a2c1c4f89a5e220e7b39420ebea33623c7c72804
Source-Link: googleapis/synthtool@a2c1c4f

* Fix documentation for string_value. The value does not have to be at least 1MB, but rather, at most 1MB.

PiperOrigin-RevId: 309845930

Source-Author: Google APIs <[email protected]>
Source-Date: Mon May 4 16:55:46 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 1b5a8d2bbb69c5a04db26bd546d2888e609c6bab
Source-Link: googleapis/googleapis@1b5a8d2

* fix: make args optional (#521)

Source-Author: Summer Ji <[email protected]>
Source-Date: Tue May 5 09:52:17 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: ea3ae392fced25d7d6f5c7ef9c8a1f24768a0936
Source-Link: googleapis/synthtool@ea3ae39

* fix: make .kokoro-autosynth executable (#522)

to fix googleapis/synthtool#519

Source-Author: Jeffrey Rennie <[email protected]>
Source-Date: Tue May 5 10:12:11 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: ab883569eb0257bbf16a6d825fd018b3adde3912
Source-Link: googleapis/synthtool@ab88356

* fix: add resource reference to proto files
chore: update copyright and comments

PiperOrigin-RevId: 309990843

Source-Author: Google APIs <[email protected]>
Source-Date: Tue May 5 11:51:12 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 4bef0001ac7040431ea24b6187424fdec9c08b1b
Source-Link: googleapis/googleapis@4bef000
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
Source-Author: Tomo Suzuki <[email protected]>
Source-Date: Wed Aug 25 13:18:10 2021 -0400
Source-Repo: googleapis/synthtool
Source-Sha: e2aa5bcc3356d9e3b8b53de3b5c86226447d3a22
Source-Link: googleapis/synthtool@e2aa5bc
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 11, 2026
…3.0 (googleapis#520)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.2.0` -> `20.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/compatibility-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/confidence-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
suztomo pushed a commit that referenced this pull request Mar 30, 2026
This PR was generated using Autosynth. 🌈


<details><summary>Log from Synthtool</summary>

```
2021-04-12 14:42:28,697 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-storage-nio/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-04-12 14:42:29,934 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.

```
</details>

Full log will be available here:
https://source.cloud.google.com/results/invocations/173f9e26-82cc-4c65-928c-ecaf1261b4ce/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: cloudresourcemanager Issues related to the Resource Manager API. cla: yes This human has signed the Contributor License Agreement. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants