From a5331eeeadd1f248b6961078303d75d41f241919 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Thu, 6 Dec 2012 17:09:17 +0000 Subject: [PATCH] HADOOP-9121. InodeTree.java has redundant check for vName while throwing exception. Contributed by Arup Malakar. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1418005 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../main/java/org/apache/hadoop/fs/viewfs/InodeTree.java | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index a869f68580..970d3516d7 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -289,6 +289,9 @@ Trunk (Unreleased) HADOOP-9037. Bug in test-patch.sh and precommit build process (Kihwal Lee via jlowe) + HADOOP-9121. InodeTree.java has redundant check for vName while + throwing exception. (Arup Malakar via suresh) + OPTIMIZATIONS HADOOP-7761. Improve the performance of raw comparisons. (todd) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java index ef64831287..304785100c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java @@ -118,8 +118,7 @@ INode resolve(final String pathComponent) throws FileNotFoundException { return result; } - INode resolveInternal(final String pathComponent) - throws FileNotFoundException { + INode resolveInternal(final String pathComponent) { return children.get(pathComponent); } @@ -336,8 +335,8 @@ protected InodeTree(final Configuration config, final String viewName) } if (!gotMountTableEntry) { throw new IOException( - "ViewFs: Cannot initialize: Empty Mount table in config for " + - vName == null ? "viewfs:///" : ("viewfs://" + vName + "/")); + "ViewFs: Cannot initialize: Empty Mount table in config for " + + "viewfs://" + vName + "/"); } }