[
https://issues.apache.org/jira/browse/IGNITE-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15209975#comment-15209975
]
Denis Magda commented on IGNITE-2849:
-------------------------------------
Vladimir,
Thanks for the review.
1) This modification was required to fix wrong metadata related issue. One of
the tests put "null" as a value for a field read from the store. After that a
non-null value was set for the field but we got wrong metadata exception
because Object type is not equal to String type. That's why I switched to the
usage of {{BinaryObjectBuilder.setField(String name, @Nullable T val, Class<?
super T> type)}}
2) That was required modification to fix the bug when
{{BinaryUtils.fieldTypeId(String typeName)}} always returned {{OBJ}} type for
both {{OBJ}} and {{BINARY_OBJ}} and this lead to the bugs I revealed after
fixing the wrong metadata issue.
> BinaryObjectBuilder doesn't properly check metadata
> ---------------------------------------------------
>
> Key: IGNITE-2849
> URL: https://issues.apache.org/jira/browse/IGNITE-2849
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 1.5.0.final
> Reporter: Denis Magda
> Assignee: Denis Magda
> Priority: Critical
> Labels: community, important
> Fix For: 1.6
>
>
> There are several cases when {{BinaryObjectBuilder}} doesn't properly check
> fields metadata when {{build}} method is called.
> 1) Set {{builder.setField("name", null).build()}} and
> {{builder.setField("name", new Date()).build()}} won't check metadata
> allowing to serialize the object;
> 2) Metadata is not checked at all if new BinaryObject is assembled from the
> previous one {{binaries.builder(someBinaryObject).setField().build()}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)