Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F034317619 for ; Wed, 8 Apr 2015 15:28:20 +0000 (UTC) Received: (qmail 27745 invoked by uid 500); 8 Apr 2015 15:27:22 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 27679 invoked by uid 500); 8 Apr 2015 15:27:22 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 27580 invoked by uid 99); 8 Apr 2015 15:27:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 15:27:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 08 Apr 2015 15:27:21 +0000 Received: (qmail 22929 invoked by uid 99); 8 Apr 2015 15:26:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 15:26:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 69E97E2F2E; Wed, 8 Apr 2015 15:26:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sevdokimov@apache.org To: commits@ignite.incubator.apache.org Date: Wed, 08 Apr 2015 15:27:40 -0000 Message-Id: <09700203e30e41e08be5cb6aaaba9d9d@git.apache.org> In-Reply-To: <70317350456349edbfbbe29fc2cff2bf@git.apache.org> References: <70317350456349edbfbbe29fc2cff2bf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [46/50] incubator-ignite git commit: ignite-624 - minor X-Virus-Checked: Checked by ClamAV on apache.org ignite-624 - minor Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ab2fe776 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ab2fe776 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ab2fe776 Branch: refs/heads/ignite-30 Commit: ab2fe77642294b9cfb432ed43ad41bf320503839 Parents: e0d88d3 Author: S.Vladykin Authored: Wed Apr 8 14:28:24 2015 +0300 Committer: S.Vladykin Committed: Wed Apr 8 14:28:24 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/internal/util/lang/GridFunc.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab2fe776/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java index fee53ef..c7574f3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java @@ -5433,8 +5433,18 @@ public class GridFunc { * @param it Iterable to fetch. * @return Modified target collection. */ + @SuppressWarnings("unchecked") public static > C addAll(C c, Iterable it) { - return it == null ? c : addAll(c, it.iterator()); + if (it == null) + return c; + + if (it instanceof Collection) { + c.addAll((Collection)it); + + return c; + } + + return addAll(c, it.iterator()); } /**