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/54e6991c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/54e6991c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/54e6991c Branch: refs/heads/gridgain-7.5.11-vk Commit: 54e6991cb1d0b68c4490dede603c9e3ba7cc3b9e Parents: 37c4d50 Author: vozerov-gridgain <[email protected]> Authored: Mon Mar 14 12:05:39 2016 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Tue Mar 29 15:13:02 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/54e6991c/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.
