U4-7522 - Unnecessary internal/swallowed MissingMemberException in DeepCloneHelper

Created by Andrey Shchekin 10 Dec 2015, 00:11:24 Updated by Sebastiaan Janssen 05 Jan 2016, 09:44:12

I have an integration tests scenario where setup calls GetAllTypeDefinitions() many times. I'm going to improve that, however I found one Umbraco part that might be worth improving.

Specifically this: https://github.com/umbraco/Umbraco-CMS/blob/d50e49ad37fd5ca7bad2fd6e8fc994f3408ae70c/src/Umbraco.Core/Models/DeepCloneHelper.cs#L84. For properties that are IDictionary it throws MissingMemberException, and that happens a lot in my tests.

It makes the debugging slower and interferes with "Break on All Exceptions".

I plan to do a pull request for this -- checking that PropertyType is not an interface or an abstract class before attempting to create it.


Shannon Deminick 14 Dec 2015, 10:07:12

PR: https://github.com/umbraco/Umbraco-CMS/pull/944

Shannon Deminick 14 Dec 2015, 13:19:18

just need to confirm this works with tests

Claus Jensen 15 Dec 2015, 13:48:10

Tests working - pulled in and changed comments a bit.

Priority: Normal

Type: Performance Problem

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.1.4

Due in version: 7.4.0, 7.3.5

Sprint: Sprint 5

Story Points: