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 A0A6C200B2F for ; Sun, 3 Jul 2016 21:52:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9F1CA160A71; Sun, 3 Jul 2016 19:52:12 +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 E7F3E160A6B for ; Sun, 3 Jul 2016 21:52:11 +0200 (CEST) Received: (qmail 91505 invoked by uid 500); 3 Jul 2016 19:52:11 -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 91481 invoked by uid 99); 3 Jul 2016 19:52:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2016 19:52:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 09EA72C027F for ; Sun, 3 Jul 2016 19:52:11 +0000 (UTC) Date: Sun, 3 Jul 2016 19:52:11 +0000 (UTC) From: "Saikat Maitra (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (IGNITE-3263) Affinity function must check for null keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 03 Jul 2016 19:52:12 -0000 [ https://issues.apache.org/jira/browse/IGNITE-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Saikat Maitra reassigned IGNITE-3263: ------------------------------------- Assignee: Saikat Maitra > Affinity function must check for null keys > ------------------------------------------ > > Key: IGNITE-3263 > URL: https://issues.apache.org/jira/browse/IGNITE-3263 > Project: Ignite > Issue Type: Bug > Affects Versions: 1.6 > Reporter: Denis Magda > Assignee: Saikat Maitra > Labels: community > Fix For: 1.7 > > > AffinityFunction implementations must check for {{null}} keys and through meaningful exceptions in such a cases. > As an example the following code trows NPE since the keys is not validated > {code} > Cache, Person> personCache = ..; > personCache.get(new AffinityKey<>(key, affKey)); // returns value > personCache.get(new AffinityKey<>(key)); // throws NPE > Exception in thread "main" java.lang.NullPointerException > at > org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction.partition(RendezvousAffinityFunction.java:428) > at > org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.partition(GridCacheAffinityManager.java:206) > at > org.apache.ignite.internal.processors.cache.GridCacheContext.toCacheKeyObject(GridCacheContext.java:1801) > at > org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.get(GridDhtAtomicCache.java:339) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:4650) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:1391) > at > org.apache.ignite.internal.processors.cache.IgniteCacheProxy.get(IgniteCacheProxy.java:907) > at > my.apache.ignite.examples.collocation.CacheCollocationExample.main(CacheCollocationExample.java:69) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)