Return-Path: X-Original-To: apmail-ignite-issues-archive@minotaur.apache.org Delivered-To: apmail-ignite-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7F47188E7 for ; Wed, 27 Jan 2016 14:21:02 +0000 (UTC) Received: (qmail 35719 invoked by uid 500); 27 Jan 2016 14:20:40 -0000 Delivered-To: apmail-ignite-issues-archive@ignite.apache.org Received: (qmail 35642 invoked by uid 500); 27 Jan 2016 14:20:40 -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 35605 invoked by uid 99); 27 Jan 2016 14:20:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2016 14:20:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3DB312C1F90 for ; Wed, 27 Jan 2016 14:20:40 +0000 (UTC) Date: Wed, 27 Jan 2016 14:20:40 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-2273) Arrays.asList() should not be used for 1- and 2- elements. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15119285#comment-15119285 ] ASF GitHub Bot commented on IGNITE-2273: ---------------------------------------- GitHub user ilantukh opened a pull request: https://github.com/apache/ignite/pull/429 IGNITE-2273 You can merge this pull request into a Git repository by running: $ git pull https://github.com/ilantukh/ignite ignite-2273 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/429.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #429 ---- commit 0e6e55bce1567430caf47bfaf7a498f9172031ff Author: Ilya Lantukh Date: 2016-01-27T14:15:41Z ignite-2273 : Alternative to Arrays.asList() optimized for 1 and 2 element arrays. commit 4ec95281af610334296d258d6b8b8d1f533c11e0 Author: Ilya Lantukh Date: 2016-01-27T14:19:47Z ignite-2273 : reverted Arrays.asList() replacement in examples. ---- > Arrays.asList() should not be used for 1- and 2- elements. > ---------------------------------------------------------- > > Key: IGNITE-2273 > URL: https://issues.apache.org/jira/browse/IGNITE-2273 > Project: Ignite > Issue Type: Sub-task > Components: general > Affects Versions: ignite-1.4 > Reporter: Vladimir Ozerov > Assignee: Ilya Lantukh > Fix For: 1.6 > > > There are several places in code where Arrays.asList is used as follows: > 1) For a single element. These places should be replaced with Collections.singleton() to avoid unnecessary array allocations. > 2) For two elements. Here we should create our own "doubled-singleton" implementation. > Some of these places are located on hot code paths (e.g. cache PUT). -- This message was sent by Atlassian JIRA (v6.3.4#6332)