Remove unnecessary "internal" from JsonConverterFactory ctor (dotnet/corefx#39504)
authorStephen Toub <stoub@microsoft.com>
Tue, 16 Jul 2019 00:14:02 +0000 (20:14 -0400)
committerGitHub <noreply@github.com>
Tue, 16 Jul 2019 00:14:02 +0000 (20:14 -0400)
The ctor is already `protected`, so it can already be accessed by any derived type.  The only benefit adding `internal` would provide is so that it could be called directly by something else in the assembly, but the type is `abstract`, so that doesn't make sense for a ctor.

Commit migrated from https://github.com/dotnet/corefx/commit/902294e7933e84601aa4543fc3afe0dcf85c2d99

src/libraries/System.Text.Json/ref/System.Text.Json.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs

index 82bc52d..b4120e2 100644 (file)
@@ -466,7 +466,7 @@ namespace System.Text.Json.Serialization
     }
     public abstract partial class JsonConverterFactory : System.Text.Json.Serialization.JsonConverter
     {
-        protected internal JsonConverterFactory() { }
+        protected JsonConverterFactory() { }
         public abstract System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
     }
     public abstract partial class JsonConverter<T> : System.Text.Json.Serialization.JsonConverter
index 5e4d686..35cdd39 100644 (file)
@@ -17,7 +17,7 @@ namespace System.Text.Json.Serialization
         /// <summary>
         /// When overidden, constructs a new <see cref="JsonConverterFactory"/> instance.
         /// </summary>
-        protected internal JsonConverterFactory() { }
+        protected JsonConverterFactory() { }
 
         internal JsonConverter GetConverterInternal(Type typeToConvert, JsonSerializerOptions options)
         {