ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [12/50] [abbrv] ignite git commit: IGNITE-2810: IGFS: Minor correction to IgfsUtils.isRootOrTrashId() method.
Date Tue, 22 Mar 2016 16:49:48 GMT
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 <vozerov@gridgain.com>
Authored: Mon Mar 14 12:05:39 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
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.


Mime
View raw message