ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-1956) Portable object requires to have a class to get Enum field value
Date Fri, 20 Nov 2015 05:17:10 GMT

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

Vladimir Ozerov commented on IGNITE-1956:

What do you expect from calling field() method on enum field when there is no enum class?

> Portable object requires to have a class to get Enum field value
> ----------------------------------------------------------------
>                 Key: IGNITE-1956
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1956
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>            Reporter: Valentin Kulichenko
>             Fix For: 1.6
> {{PortableObject.field()}} method implementation attempts to resolve the class if the
field type is Enum. This is wrong, because this method should work on server side without
classes on classpath. Also this breaks the {{toString()}} method in this case.
> In addition, .NET always writes {{-1}} as a type ID for any enum, so on Java side it
is resolved into {{java.lang.Object}}. As a result, {{field()}} and {{toString()} method fail
with this exception:
> {code}
> Caused by: org.apache.ignite.internal.portable.api.PortableException: Class does not
represent enum type: java.lang.Object
> {code}

This message was sent by Atlassian JIRA

View raw message