ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/50] [abbrv] incubator-ignite git commit: # ignite-26
Date Tue, 03 Feb 2015 09:21:40 GMT
# ignite-26


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/51034961
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/51034961
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/51034961

Branch: refs/heads/sprint-1
Commit: 510349615010a14f4a7d648ba9d4c5fbe117b55d
Parents: 367ab94
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Feb 2 14:33:17 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Feb 2 14:33:17 2015 +0300

----------------------------------------------------------------------
 .../internal/fs/common/GridGgfsControlResponse.java     | 12 ++++++------
 .../ignite/internal/fs/hadoop/GridGgfsHadoopUtils.java  |  8 ++++----
 .../fs/GridGgfsHadoopFileSystemClientSelfTest.java      |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51034961/modules/core/src/main/java/org/apache/ignite/internal/fs/common/GridGgfsControlResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/fs/common/GridGgfsControlResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/fs/common/GridGgfsControlResponse.java
index b510136..a3e7d09 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/fs/common/GridGgfsControlResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/fs/common/GridGgfsControlResponse.java
@@ -334,18 +334,18 @@ public class GridGgfsControlResponse extends GridGgfsMessage {
     private int errorCode(IgniteCheckedException e, boolean checkIo) {
         if (X.hasCause(e, IgniteFsFileNotFoundException.class))
             return ERR_FILE_NOT_FOUND;
-        else if (IgniteFsPathAlreadyExistsException.class.isInstance(e))
+        else if (e.hasCause(IgniteFsPathAlreadyExistsException.class))
             return ERR_PATH_ALREADY_EXISTS;
-        else if (GridGgfsDirectoryNotEmptyException.class.isInstance(e))
+        else if (e.hasCause(GridGgfsDirectoryNotEmptyException.class))
             return ERR_DIRECTORY_NOT_EMPTY;
-        else if (IgniteFsParentNotDirectoryException.class.isInstance(e))
+        else if (e.hasCause(IgniteFsParentNotDirectoryException.class))
             return ERR_PARENT_NOT_DIRECTORY;
-        else if (IgniteFsInvalidHdfsVersionException.class.isInstance(e))
+        else if (e.hasCause(IgniteFsInvalidHdfsVersionException.class))
             return ERR_INVALID_HDFS_VERSION;
-        else if (X.hasCause(e, IgniteFsCorruptedFileException.class))
+        else if (e.hasCause(IgniteFsCorruptedFileException.class))
             return ERR_CORRUPTED_FILE;
             // This check should be the last.
-        else if (IgniteFsException.class.isInstance(e))
+        else if (e.hasCause(IgniteFsException.class))
             return ERR_GGFS_GENERIC;
 
         return ERR_GENERIC;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51034961/modules/hadoop/src/main/java/org/apache/ignite/internal/fs/hadoop/GridGgfsHadoopUtils.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/fs/hadoop/GridGgfsHadoopUtils.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/fs/hadoop/GridGgfsHadoopUtils.java
index ed4b8f6..aa8f264 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/fs/hadoop/GridGgfsHadoopUtils.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/fs/hadoop/GridGgfsHadoopUtils.java
@@ -110,13 +110,13 @@ public class GridGgfsHadoopUtils {
         // First check for any nested IOException; if exists - re-throw it.
         if (e.hasCause(IOException.class))
             return e.getCause(IOException.class);
-        else if (e.getCause() instanceof IgniteFsFileNotFoundException)
+        else if (e.hasCause(IgniteFsFileNotFoundException.class))
             return new FileNotFoundException(path); // TODO: Or PathNotFoundException?
-        else if (e.getCause() instanceof IgniteFsParentNotDirectoryException)
+        else if (e.hasCause(IgniteFsParentNotDirectoryException.class))
             return new ParentNotDirectoryException(path);
-        else if (path != null && e.getCause() instanceof GridGgfsDirectoryNotEmptyException)
+        else if (path != null && e.hasCause(GridGgfsDirectoryNotEmptyException.class))
             return new PathIsNotEmptyDirectoryException(path);
-        else if (path != null && e.getCause() instanceof IgniteFsPathAlreadyExistsException)
+        else if (path != null && e.hasCause(IgniteFsPathAlreadyExistsException.class))
             return new PathExistsException(path);
         else
             return new IOException(e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51034961/modules/hadoop/src/test/java/org/apache/ignite/fs/GridGgfsHadoopFileSystemClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/fs/GridGgfsHadoopFileSystemClientSelfTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/fs/GridGgfsHadoopFileSystemClientSelfTest.java
index b18b8cc..62b7052 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/fs/GridGgfsHadoopFileSystemClientSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/fs/GridGgfsHadoopFileSystemClientSelfTest.java
@@ -117,7 +117,7 @@ public class GridGgfsHadoopFileSystemClientSelfTest extends GridGgfsCommonAbstra
     /**
      * Test output stream deferred exception (GG-4440).
      *
-     * @throws IgniteCheckedException If failed.
+     * @throws Exception If failed.
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
     public void testOutputStreamDeferredException() throws Exception {


Mime
View raw message