[
https://issues.apache.org/jira/browse/IGNITE-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denis Magda updated IGNITE-2430:
--------------------------------
Assignee: Vladimir Ozerov
> BinaryObject: Inconsistent field type name is returned for Collections
> ----------------------------------------------------------------------
>
> Key: IGNITE-2430
> URL: https://issues.apache.org/jira/browse/IGNITE-2430
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 1.5.0.final
> Reporter: Denis Magda
> Assignee: Vladimir Ozerov
> Labels: important
> Fix For: 1.6
>
>
> Run this code below and you will see that different field type name is
> returned for objects of the same type. There is a bug in
> {{BinaryObjectBuilderImpl.serializeTo}} method.
> {noformat}
> BinaryObjectBuilder root = ignite.binary().builder("some_objects");
> root.setField("bi", new BigInteger(String.valueOf(Long.MAX_VALUE) +
> "1"), BigInteger.class);
> root.setField("bd", new BigDecimal(String.valueOf(Long.MAX_VALUE) +
> "1.1"), BigDecimal.class);
> List<Integer> list = new ArrayList<>();
> list.add(Integer.MAX_VALUE);
> root.setField("l", list); //<- here: Collection
> root.setField("al", Arrays.<Integer>asList(Integer.MAX_VALUE)); //<-
> here: Object
> BinaryObject binaryObject = root.build();
> System.out.println(binaryObject.type().fieldTypeName("l"));
> System.out.println(binaryObject.type().fieldTypeName("al"));
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)