diff --git a/csharp/src/Google.Protobuf/JsonFormatter.cs b/csharp/src/Google.Protobuf/JsonFormatter.cs index f1154130ac..48d3ab4c3d 100644 --- a/csharp/src/Google.Protobuf/JsonFormatter.cs +++ b/csharp/src/Google.Protobuf/JsonFormatter.cs @@ -970,10 +970,7 @@ namespace Google.Protobuf Justification = "The field for the value must still be present. It will be returned by reflection, will be in this collection, and its name can be resolved.")] internal static string GetOriginalName(object value) { - Dictionary nameMapping = dictionaries.GetOrAdd(value.GetType(), static t => - { - return GetNameMapping(t); - }); + Dictionary nameMapping = dictionaries.GetOrAdd(value.GetType(), static t => GetNameMapping(t)); // If this returns false, originalName will be null, which is what we want. nameMapping.TryGetValue(value, out string originalName);