FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Handle optional fields with null JSON value in ExternalAccountCredentials gracefully by clementdenis · Pull Request #1706 · googleapis/google-auth-library-java · GitHub

This repository was archived by the owner on May 12, 2026. It is now read-only.

fix: Handle optional fields with null JSON value in ExternalAccountCredentials gracefully - #1706

Merged
lqiu96 merged 1 commit into
googleapis:mainfrom
clementdenis:null_optional_fields_graceful_handling
May 1, 2025
Merged

fix: Handle optional fields with null JSON value in ExternalAccountCredentials gracefully#1706
lqiu96 merged 1 commit into
googleapis:mainfrom
clementdenis:null_optional_fields_graceful_handling

Conversation

Copy link
Copy Markdown
Contributor

This PR handles correctly JSON null values for optional fields in ExternalAccountCredentials configuration.

This is likely a partial fix, other credential classes have the same issue (just search for (String) json.get( in the codebase).

The approach might applied to all json fields, including required ones, to avoid ClassCastException and have better errors.

Fixes #1705 ☕️

clementdenis requested review from a team March 10, 2025 14:40
product-auto-label Bot added the size: s Pull request size is small. label Mar 10, 2025

lqiu96 commented Mar 11, 2025

Copy link
Copy Markdown
Member

For the PR, can you update title to use convention commits? I think can just add a fix: ... prefix to the title.

Also, I think the linter CI is failing. Can you run mvn fmt:format on this change?

lqiu96 requested a review from aeitzman March 11, 2025 20:18

lqiu96 commented Mar 11, 2025

Copy link
Copy Markdown
Member

Adding @aeitzman for review on 3pi code.

clementdenis force-pushed the null_optional_fields_graceful_handling branch from b951fa6 to cf7fa5a Compare March 12, 2025 09:52

lqiu96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. @aeitzman to review as a 3PI reviewer in case I'm missing any context about ExternalAccountCredentials and null values.

lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 12, 2025
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 12, 2025

lqiu96 commented Mar 28, 2025

Copy link
Copy Markdown
Member

Adding a different reviewer as there have been some changes.

lqiu96 requested review from zhumin8 and removed request for aeitzman March 28, 2025 18:49
lqiu96 changed the title Handle optional fields with null JSON value gracefully fix: Handle optional fields with null JSON value in ExternalAccountCredentials gracefully May 1, 2025
lqiu96 merged commit f1f306d into googleapis:main May 1, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request May 13, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.auth:google-auth-library-oauth2-http](https://github.com/googleapis/google-auth-library-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.34.0` -> `1.35.0` |
|
[com.google.auth:google-auth-library-credentials](https://github.com/googleapis/google-auth-library-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.34.0` -> `1.35.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.40` -> `2.31.41` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.40` -> `2.31.41` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.40` -> `2.31.41` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.40` -> `2.31.41` |

---

### Release Notes

<details>
<summary>googleapis/google-auth-library-java
(com.google.auth:google-auth-library-oauth2-http)</summary>

###
[`v1.35.0`](https://github.com/googleapis/google-auth-library-java/blob/HEAD/CHANGELOG.md#1350-2025-05-12)

##### Features

- Add support for mTLS authentication via X.509 certificates
([#&#8203;1736](googleapis/google-auth-library-java#1736))
([b347603](googleapis/google-auth-library-java@b347603))
- Return X509 certificate chain as the subject token.
([#&#8203;1746](googleapis/google-auth-library-java#1746))
([6d05be8](googleapis/google-auth-library-java@6d05be8))

##### Bug Fixes

- Handle optional fields in ExternalAccountCredentials with null JSON
value gracefully
([#&#8203;1706](googleapis/google-auth-library-java#1706))
([f1f306d](googleapis/google-auth-library-java@f1f306d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: abc60fba8102e94da5ecb2e7537ccaf5d3d8628f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExternalAccountCredentials.fromStream() throws exception on optional fields with null value

3 participants


Back | FazBrowse Home | New Git URL