Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Prevent non-framework code from extending BaseNumberConverter #1176

Merged
merged 1 commit into from
May 9, 2019

Conversation

terrajobst
Copy link
Member

@terrajobst terrajobst commented May 2, 2019

This fixes #1171.

Please note that this is technically an API breaking change (we shipped BaseNumberConverter in .NET Standard 2.0 with a protected constructor, which was mistake). But there is no way to derive and instantiate this class. An exception will get thrown if you try to instantiate the derived class.

For more details, see dotnet/corefx#37278.

/cc @ericstj

@terrajobst terrajobst requested review from a team as code owners May 2, 2019 22:31
@terrajobst terrajobst added the netstandard-api This tracks requests for standardizing APIs. label May 2, 2019
@terrajobst terrajobst added this to the .NET Standard 2.1 milestone May 2, 2019
Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

Thanks @hughbe for pointing this out.

@terrajobst
Copy link
Member Author

@joshpeterson @JonathanHUnity any objections?

@terrajobst
Copy link
Member Author

@joshpeterson @JonathanHUnity friendly ping :-)

@ericstj
Copy link
Member

ericstj commented May 9, 2019

@Anipik actually discovered more of these that should be rolled into this change dotnet/corefx@28a926b

@terrajobst terrajobst merged commit 904f4f5 into dotnet:master May 9, 2019
@terrajobst terrajobst deleted the base-number-converter-fix branch May 9, 2019 20:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
netstandard-api This tracks requests for standardizing APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BaseNumberConverter should be effectively sealed
8 participants