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 3BCA919057 for ; Tue, 22 Mar 2016 16:49:38 +0000 (UTC) Received: (qmail 59437 invoked by uid 500); 22 Mar 2016 16:49:38 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 59191 invoked by uid 500); 22 Mar 2016 16:49:37 -0000 Mailing-List: contact commits-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 commits@ignite.apache.org Received: (qmail 58803 invoked by uid 99); 22 Mar 2016 16:49:37 -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; Tue, 22 Mar 2016 16:49:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5FF66DFFF0; Tue, 22 Mar 2016 16:49:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ntikhonov@apache.org To: commits@ignite.apache.org Date: Tue, 22 Mar 2016 16:49:48 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [12/50] [abbrv] ignite git commit: IGNITE-2810: IGFS: Minor correction to IgfsUtils.isRootOrTrashId() method. IGNITE-2810: IGFS: Minor correction to IgfsUtils.isRootOrTrashId() method. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d83fa116 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d83fa116 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d83fa116 Branch: refs/heads/ignite-2004 Commit: d83fa11663f121097753952429c10fd80451bfd4 Parents: 2d14842 Author: vozerov-gridgain Authored: Mon Mar 14 12:05:39 2016 +0300 Committer: vozerov-gridgain Committed: Mon Mar 14 12:05:39 2016 +0300 ---------------------------------------------------------------------- .../internal/processors/igfs/IgfsUtils.java | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/d83fa116/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java index 6f8960a..edded2f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java @@ -98,12 +98,22 @@ public class IgfsUtils { } /** + * Check whether provided ID is either root ID or trash ID. + * + * @param id ID. + * @return {@code True} if this is root ID or trash ID. + */ + public static boolean isRootOrTrashId(@Nullable IgniteUuid id) { + return id != null && (ROOT_ID.equals(id) || isTrashId(id)); + } + + /** * Check whether provided ID is trash ID. * * @param id ID. * @return {@code True} if this is trash ID. */ - public static boolean isTrashId(IgniteUuid id) { + private static boolean isTrashId(IgniteUuid id) { assert id != null; UUID gid = id.globalId(); @@ -113,16 +123,6 @@ public class IgfsUtils { } /** - * Check whether provided ID is either root ID or trash ID. - * - * @param id ID. - * @return {@code True} if this is root ID or trash ID. - */ - public static boolean isRootOrTrashId(IgniteUuid id) { - return ROOT_ID.equals(id) || isTrashId(id); - } - - /** * Converts any passed exception to IGFS exception. * * @param err Initial exception.