[ 
https://issues.apache.org/jira/browse/IGNITE-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857638#comment-15857638
 ] 

ASF GitHub Bot commented on IGNITE-3244:
----------------------------------------

GitHub user voipp opened a pull request:

    https://github.com/apache/ignite/pull/1505

    IGNITE-3244 Custom arrays arent serialized properly

    arrays type now considered while deserialization. After deserialization 
you've got array of correct type

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/voipp/ignite IGNITE-3244

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/1505.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1505
    
----
commit f80a73cc8c416ad24053afa43f773f7f1e6e9dd6
Author: voipp <[email protected]>
Date:   2017-02-06T16:10:11Z

    IGNITE-3244 Custom arrays arent serialized properly

----


> Custom arrays are not serialized properly by CacheObjectBinaryProcessorImpl
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-3244
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3244
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: ignite-1.4
>            Reporter: Denis Magda
>            Assignee: Alexey Kuznetsov
>            Priority: Minor
>             Fix For: 2.0
>
>
> If to put a custom object array into a cache like this one
> {code}
>             TestObject[] arr = new TestObject[] {new TestObject(i)};
>             cache.put(0, arr);
> {code}
> then it will be serialized as Object[] array in 
> {{CacheObjectBinaryProcessorImpl.marshallToBinary}} method.
> This leads to the situation when object's array type is lost and on cache.get 
> the code below produces {{ClassCastException}}
> {code}
> TestObject[] obj = cache.get(i);
> {code}
> The full test is already added into 
> {{GridCacheBinaryObjectsAbstractSelfTest.testCustomArrays}}.
> To fix the issue we have to revisit logic of 
> {{CacheObjectBinaryProcessorImpl.marshallToBinary}} and 
> {{CacheObjectContext.unwrapBinary}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to