[jira] [Created] (IGNITE-4109) BinaryType.isEnum() throws an exception if typeId==0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IGNITE-4109) BinaryType.isEnum() throws an exception if typeId==0

Anton Vinogradov (Jira)
Valentin Kulichenko created IGNITE-4109:
-------------------------------------------

             Summary: BinaryType.isEnum() throws an exception if typeId==0
                 Key: IGNITE-4109
                 URL: https://issues.apache.org/jira/browse/IGNITE-4109
             Project: Ignite
          Issue Type: Bug
          Components: binary
    Affects Versions: 1.7
            Reporter: Valentin Kulichenko
             Fix For: 1.8


If {{typeId==0}} and full class name is written in the binary format, {{BinaryType.isEnum()}} method fails with the exception:
{noformat}
Caused by: org.apache.ignite.binary.BinaryObjectException: Failed to get binary type details [typeId=0]
  at org.apache.ignite.internal.binary.BinaryTypeProxy.target(BinaryTypeProxy.java:99) ~[ignite-core-1.6.7.jar:1.6.7]
  at org.apache.ignite.internal.binary.BinaryTypeProxy.isEnum(BinaryTypeProxy.java:86) ~[ignite-core-1.6.7.jar:1.6.7]
{noformat}
This happens because {{BinaryTypeProxy.target()}} method ignores this case. If {{typeId==0}}, It should look up full class name from the object and convert it to the actual type ID before trying to fetch metadata.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)