You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "kkkars (via GitHub)" <gi...@apache.org> on 2024/08/07 11:14:23 UTC
Re: [PR] AVRO-4028: Avro.AvroException: Unable to find type 'IDictionary' in all loaded assemblies [avro]
kkkars commented on code in PR #3072:
URL: https://github.com/apache/avro/pull/3072#discussion_r1706819557
##########
lang/csharp/src/apache/main/Specific/ObjectCreator.cs:
##########
@@ -90,6 +95,14 @@ private Type FindType(string name)
return GenericIListType.MakeGenericType(FindType(itemTypeName));
}
+ if (TryGetIDictionaryItemTypeName(name, out var itemTypesName))
+ {
+ var key = itemTypesName[0].GetType().Name;
Review Comment:
The logic on the line 135 (if (name == t.Name || name == t.FullName ..) compare in case sensetive way. So it's not able to handle string (system name is String)
.GetType().Name helps to handle string type correctly (changing string to String).
That is **not** a flexible solution and it requires key to always be a string. Changing the type names comparing logic also does not sound like a good idea.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org