ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirill Tkalenko (Jira)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-12324) improper message in BinaryObjectException is printed when accessing fieldOrder method binary field with binary object of unregistered type
Date Wed, 23 Oct 2019 06:18:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-12324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kirill Tkalenko updated IGNITE-12324:
-------------------------------------
    Description: 
Scenario
 1. Create `BinaryObject` instance with `time` field of type `TimeValue`.
 2. Extract `BinaryField` `time` from binary object
 3. Modify binary object internal array so that it would reference non existing binary type
 4. Invoke `fieldOrder` (or `value`) of binary field passing modified binary object
 5. Expect that `BinaryObjectException` is thrown
 5.1 Expect that message contains information about expected and actual binary type id, expected
type name, field id, field name, expected field type.
 5.2. Expect that for actual type name message contains 'null'

 Actual:
{code:java}
class org.apache.ignite.binary.BinaryObjectException: Failed to get binary type details [typeId=-1291121110]
at org.apache.ignite.internal.binary.BinaryTypeProxy.target(BinaryTypeProxy.java:116) at org.apache.ignite.internal.binary.BinaryTypeProxy.typeName(BinaryTypeProxy.java:75)
at org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:291)
at org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:109)
{code}

  was:
Scenario
 1. Create `BinaryObject` instance with `time` field of type `TimeValue`.
 2. Extract `BinaryField` `time` from binary object
 3. Modify binary object internal array so that it would reference non existing binary type
 4. Invoke `fieldOrder` (or `value`) of binary field passing modified binary object
 5. Expect that `BinaryObjectException` is thrown
 5.1 Expect that message contains information about expected and actual binary type id, expected
type name, field id, field name, expected field type.
 5.2. Expect that for actual type name message contains 'null'

 

Actual:

{noformat}
{noformat}
class org.apache.ignite.binary.BinaryObjectException: Failed to get binary type details [typeId=-1291121110]
at org.apache.ignite.internal.binary.BinaryTypeProxy.target(BinaryTypeProxy.java:116) at org.apache.ignite.internal.binary.BinaryTypeProxy.typeName(BinaryTypeProxy.java:75)
at org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:291)
at org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:109){noformat}
{noformat}


> improper message in BinaryObjectException is printed when accessing fieldOrder method
binary field with binary object of unregistered type
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-12324
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12324
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Kirill Tkalenko
>            Assignee: Kirill Tkalenko
>            Priority: Major
>             Fix For: 2.8
>
>
> Scenario
>  1. Create `BinaryObject` instance with `time` field of type `TimeValue`.
>  2. Extract `BinaryField` `time` from binary object
>  3. Modify binary object internal array so that it would reference non existing binary
type
>  4. Invoke `fieldOrder` (or `value`) of binary field passing modified binary object
>  5. Expect that `BinaryObjectException` is thrown
>  5.1 Expect that message contains information about expected and actual binary type id,
expected type name, field id, field name, expected field type.
>  5.2. Expect that for actual type name message contains 'null'
>  Actual:
> {code:java}
> class org.apache.ignite.binary.BinaryObjectException: Failed to get binary type details
[typeId=-1291121110] at org.apache.ignite.internal.binary.BinaryTypeProxy.target(BinaryTypeProxy.java:116)
at org.apache.ignite.internal.binary.BinaryTypeProxy.typeName(BinaryTypeProxy.java:75) at
org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:291) at
org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:109)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message