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 3441D17EEE for ; Mon, 2 Feb 2015 11:34:44 +0000 (UTC) Received: (qmail 91327 invoked by uid 500); 2 Feb 2015 11:34:23 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 91292 invoked by uid 500); 2 Feb 2015 11:34:23 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 91283 invoked by uid 99); 2 Feb 2015 11:34:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Feb 2015 11:34:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Feb 2015 11:34:01 +0000 Received: (qmail 90805 invoked by uid 99); 2 Feb 2015 11:33:58 -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; Mon, 02 Feb 2015 11:33:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E2A20E035D; Mon, 2 Feb 2015 11:33:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Message-Id: <99c2a4dd521647a7a7cc766a3754864a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-ignite git commit: # ignite-26 Date: Mon, 2 Feb 2015 11:33:57 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-ignite Updated Branches: refs/heads/ignite-26 367ab94bb -> 510349615 # 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/ignite-26 Commit: 510349615010a14f4a7d648ba9d4c5fbe117b55d Parents: 367ab94 Author: sboikov Authored: Mon Feb 2 14:33:17 2015 +0300 Committer: sboikov 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 {