unoplatform / Uno.CodeGen

A set of source generators for equality, immutability, ...
Other
90 stars 11 forks source link

fixes NullReferenceException deserializing null sub-objects from json #117

Closed beppemarazzi closed 4 years ago

beppemarazzi commented 5 years ago

PR Type

What is the current behavior?

Deserializing from json an immutable object containing a reference to another immutable object throws a NullReferenceException if the sub-object is null in json. To reproduce the issue merge only src/Uno.CodeGen.Tests/Given_ImmutableEntity.Newtownsoft.cs leaving current src/Uno.CodeGen/ImmutableGenerator.cs

What is the new behavior?

The object is correctly deserialized with sub-object reference set to null

PR Checklist

Other information

Internal Issue (If applicable):

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: beppemarazzi
:x: carldebilly
You have signed the CLA already but the status is still pending? Let us recheck it.

gitpod-io[bot] commented 5 years ago

carldebilly commented 4 years ago

Published as v1.33.0-dev.160 https://www.nuget.org/packages/Uno.CodeGen/1.33.0-dev.160

Uno.CodeGen 1.32.0
This package provides tooling for code generation.