Skip to content

Backport of format/diff: fix panic with null map in NestedType attrs into v1.0#29207

Merged
mildwonkey merged 1 commit intov1.0from
backport/mildwonkey/nt-map-crash/shortly-viable-jay
Jul 21, 2021
Merged

Backport of format/diff: fix panic with null map in NestedType attrs into v1.0#29207
mildwonkey merged 1 commit intov1.0from
backport/mildwonkey/nt-map-crash/shortly-viable-jay

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jul 21, 2021

Backport

This PR is auto-generated from #29206 to be assessed for backporting due to the inclusion of the label 1.0-backport.

The below text is copied from the body of the original PR.


writeNestedAttrDiff wasn't prepared to handle entirely null maps. This commit adds a test (which reproduced the panic before the fix) and the same map handling that's in the nested block format printer, which treats null maps as empty maps.

Fixes #29205

@ghost ghost requested a review from mildwonkey July 21, 2021 12:51
@mildwonkey mildwonkey merged commit f16a55c into v1.0 Jul 21, 2021
@mildwonkey mildwonkey deleted the backport/mildwonkey/nt-map-crash/shortly-viable-jay branch July 21, 2021 13:13
@github-actions
Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant