[
https://issues.apache.org/jira/browse/IGNITE-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14948746#comment-14948746
]
Vladimir Ozerov edited comment on IGNITE-1619 at 10/8/15 2:31 PM:
------------------------------------------------------------------
Partial review of public API:
1) Looks like WriteObjectArray should be split into pair of methods for
consistency with collections/dictionaries and to avoid misuse:
WriteObjectArray(object[]) and WriteGenericObjectArray<T>(T[]).
Lets fix that and add new metadata types and finish with public part. Protocol
implementation can be reviewed independenty.
was (Author: vozerov):
Partial review of public API:
1) PortableReaderExtensions - looks strange to me. User definitely will be
confused when looking at "ReadDictionary", "ReadGenericDictionary" and
"ReadDictionaryAsGeneric" methods. Having overloaded method "IDictionary
ReadDictionary(string fieldName, PortableDictionaryFactory<K, V> factory);"
should be enough here. Also lets rename PortableGenericDictionaryFactory to
PortableDictionaryFactory. The same goes for ReadCollectionAsList - I would not
add it to already pretty complex reader until we have real users demand.
2) Looks like WriteObjectArray should be split into pair of methods for
consistency with collections/dictionaries and to avoid misuse:
WriteObjectArray(object[]) and WriteGenericObjectArray<T>(T[]).
Lets fix that and add new metadata types and finish with public part. Protocol
implementation can be reviewed independenty.
> Platform .Net: Generic type is lost during array/collection serialization
> -------------------------------------------------------------------------
>
> Key: IGNITE-1619
> URL: https://issues.apache.org/jira/browse/IGNITE-1619
> Project: Ignite
> Issue Type: Bug
> Components: interop
> Affects Versions: ignite-1.4
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Fix For: ignite-1.5
>
>
> We do not serialize collection/array element type, so on deserialization we
> can not recreate original collection. So generic arrays/collections can't be
> used in job arguments, service arguments, etc.
> * We should keep current format for non-generic collections, arrays of
> primitives, and arrays of objects
> * Generic collections and arrays should be written with new TypeIds (not
> compatible with other platforms) and include type information
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)