From 0de384d23b7347b022d1134f52276930870d4320 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 26 May 2009 16:08:26 +0000 Subject: [PATCH] Remove a few lines of redundant code git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@778784 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/naming/resources/FileDirContext.java | 5 ++--- java/org/apache/naming/resources/ResourceAttributes.java | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/java/org/apache/naming/resources/FileDirContext.java b/java/org/apache/naming/resources/FileDirContext.java index f42c367e2..ca03de22d 100644 --- a/java/org/apache/naming/resources/FileDirContext.java +++ b/java/org/apache/naming/resources/FileDirContext.java @@ -819,12 +819,11 @@ public class FileDirContext extends BaseDirContext { if (fileAbsPath.endsWith(".")) fileAbsPath = fileAbsPath + "/"; String absPath = normalize(fileAbsPath); - if (canPath != null) - canPath = normalize(canPath); + canPath = normalize(canPath); if ((absoluteBase.length() < absPath.length()) && (absoluteBase.length() < canPath.length())) { absPath = absPath.substring(absoluteBase.length() + 1); - if ((canPath == null) || (absPath == null)) + if (absPath == null) return null; if (absPath.equals("")) absPath = "/"; diff --git a/java/org/apache/naming/resources/ResourceAttributes.java b/java/org/apache/naming/resources/ResourceAttributes.java index c053bfa0b..93cac16aa 100644 --- a/java/org/apache/naming/resources/ResourceAttributes.java +++ b/java/org/apache/naming/resources/ResourceAttributes.java @@ -688,8 +688,6 @@ public class ResourceAttributes implements Attributes { if (result == null) { if (collection) result = COLLECTION_TYPE; - else - result = null; } return result; } -- 2.11.0