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

Andrew Mashenkov commented on IGNITE-5087:
------------------------------------------

Actually, we check if object is enum instance by calling 'isEnum()' method on 
class.

It works fine if it is enum constant. But enum objects type is anonymous class 
and isEnum() method on it returns false, 
that leads these object to be serialized as regular objects.

Startpoint is BinaryFieldAccessor.mode() method. 
1. It uses to detect serialization mode for field value type, but not for field 
type itself. 
2. Also, we should write enum.getDeclaredClass name instead of value class. See 
BinaryWriterImpl.doWriteEnum().



> Enum comparison fails after marshal-unmarshal with BinaryMarshaller.
> --------------------------------------------------------------------
>
>                 Key: IGNITE-5087
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5087
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.9
>            Reporter: Andrew Mashenkov
>             Fix For: 2.1
>
>         Attachments: EnumBinaryMarshallerBug.java
>
>
> PFA repro.
> It fails on 1.9 and on 2.0-snapshot as well.



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

Reply via email to