Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove extra call to PropertyInfo.GetValue(object) (#60415)" #63586

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Jan 10, 2022

Fixes #63479

This reverts commit 97ef512 which was trying to fix #52905

)"

This reverts commit 97ef512.

# Conflicts:
#	src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs
@ghost
Copy link

ghost commented Jan 10, 2022

Tagging subscribers to this area: @dotnet/area-extensions-configuration
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #63479

This reverts commit 97ef512 which was trying to fix #52905

Author: ericstj
Assignees: -
Labels:

area-Extensions-Configuration

Milestone: -

@eerhardt
Copy link
Member

Is it also possible to add a unit test for the regressed scenario? That way we ensure it doesn't regress again in the future.

@@ -248,17 +248,19 @@ private static void BindProperty(PropertyInfo property, object instance, IConfig
return;
}

object? propertyValue = property.GetValue(instance);
Copy link
Member

Choose a reason for hiding this comment

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

what will happen if we just call GetPropertyValue(property, instance, config, options); here instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think more work needs to be done to investigate the correct fix that addresses #52905.

@ericstj
Copy link
Member Author

ericstj commented Jan 10, 2022

Is it also possible to add a unit test for the regressed scenario? That way we ensure it doesn't regress again in the future.

At the moment I'm just doing a clean git revert. I made a note in the issue that caused this regression that we need to add a test for the regressed scenario.

@ericstj ericstj merged commit 32a24b8 into dotnet:main Jan 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants