Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48050
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 2 Feb 2010 17:39:11 +0000 (17:39 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 2 Feb 2010 17:39:11 +0000 (17:39 +0000)
createSubcontext method returns Context with wrong name
Based on a suggestion by gingyang.xu

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@905722 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/naming/NamingContext.java

index ec1f1e1..eabd744 100644 (file)
@@ -520,7 +520,7 @@ public class NamingContext implements Context {
         throws NamingException {
         checkWritable();
         
-        Context newContext = new NamingContext(env, this.name);
+        Context newContext = new NamingContext(env, name.get(name.size() - 1));
         bind(name, newContext);
         
         return newContext;