You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2016/03/15 19:18:23 UTC
[27/35] 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-2791
Commit: d83fa11663f121097753952429c10fd80451bfd4
Parents: 2d14842
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Mar 14 12:05:39 2016 +0300
Committer: vozerov-gridgain <vo...@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.