Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 315E9200B49 for ; Wed, 3 Aug 2016 12:04:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2FCC2160AAA; Wed, 3 Aug 2016 10:04:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7571A160A64 for ; Wed, 3 Aug 2016 12:04:21 +0200 (CEST) Received: (qmail 92636 invoked by uid 500); 3 Aug 2016 10:04:20 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 92574 invoked by uid 99); 3 Aug 2016 10:04:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 10:04:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8DD592C0D5E for ; Wed, 3 Aug 2016 10:04:20 +0000 (UTC) Date: Wed, 3 Aug 2016 10:04:20 +0000 (UTC) From: "Vladimir Ozerov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-2852) Support of Comparable interface for BinaryObject MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Aug 2016 10:04:22 -0000 [ https://issues.apache.org/jira/browse/IGNITE-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Ozerov updated IGNITE-2852: ------------------------------------ Assignee: Andrew Mashenkov (was: Andrey Velichko) > Support of Comparable interface for BinaryObject > ------------------------------------------------ > > Key: IGNITE-2852 > URL: https://issues.apache.org/jira/browse/IGNITE-2852 > Project: Ignite > Issue Type: Bug > Components: binary > Affects Versions: 1.5.0.final > Reporter: Valentin Kulichenko > Assignee: Andrew Mashenkov > Fix For: 1.7 > > > When trying to convert {{TreeMap}} into binary object using {{toBinary}} method, the following exception fails: > {noformat} > Exception in thread "main" java.lang.ClassCastException: org.apache.ignite.internal.binary.BinaryObjectImpl cannot be cast to java.lang.Comparable > at java.util.TreeMap.compare(TreeMap.java:1188) > at java.util.TreeMap.put(TreeMap.java:531) > at org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.marshalToBinary(CacheObjectBinaryProcessorImpl.java:495) > at org.apache.ignite.internal.processors.cache.binary.IgniteBinaryImpl.toBinary(IgniteBinaryImpl.java:67) > at TreeMapTest.main(TreeMapTest.java:15) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) > {noformat} > This happens because maps are not wrapped into binary objects, therefore we create another {{TreeMap}} and put {{BinaryObject}} instances, which are not {{Comparable}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)