PopulateWithNonDefaultValues change from nullable to nonNullable


I have recently tried upgrading Servicestack from 6.4 to 6.9.

One of my automated tests failed and with some investigation the PopulateWithNonDefaultValues changed its behaviour.

The method was used to override some properties with override settings (if specified.)

bool Enabled {get;set;} was set to true on object.

bool? Enabled {get;set;} specified on the “from” class

Before the upgrade:

If Enabled on the “from” object came as null, no change was made.

After the upgrade:

If Enabled on the “from” object came as null, value is changed to false.

Any help is appreciated

If behavior was changed it’s likely fixing a bug/undesirable behavior, if you can provide a stand-alone repro I can take a look.

using NUnit.Framework;
using ServiceStack;

namespace Repro
    public class Tests
        public void TestPopulateWithNonDefaultValues()
            var to = new To
                Enabled = true,

            var from = new From();

            // 6.4 success, 6.9 fails
    public class To
        public bool Enabled { get; set; }
    public class From
        public bool? Enabled { get; set; }

This is all that is needed to test.

Thanks this should be resolved from this commit.

Unfortunately as MyGet has been down all day today this is only available from our GitHub Packages Feed.