GumpacG commented on PR #3433: URL: https://github.com/apache/tinkerpop/pull/3433#issuecomment-4636009779
Could you also look into this issue that Kiro found? > .NET annotation hydration is unguarded and breaks the whole response (ProviderDefinedAttribute.HydrateIfRegistered + GraphBinaryReader.cs) > > `prop.SetValue(obj, Convert.ChangeType(value, prop.PropertyType));` > > This has no try/catch and no recursion into nested PDTs, yet it is called directly from GraphBinaryReader.ReadAsync: > > `return ProviderDefinedAttribute.HydrateIfRegistered(pdt);` > > Convert.ChangeType throws InvalidCastException/FormatException for any non-IConvertible or nested-PDT property value, which propagates up and fails deserialization of the entire result stream. Every other hydration path in the PR (Java registry, Python, JS, Go, .NET ProviderDefinedTypeRegistry.Hydrate) deliberately catches and returns the raw PDT. This one path violates that contract. For the nested Person→Address annotation case, Convert.ChangeType(ProviderDefinedType, typeof(Address)) will throw. Recommend wrapping in try/catch returning the raw pdt, and recursing for nested PDT-valued properties. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
