tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48050] org.apache.naming.NamingContext's createSubcontext method returns Context with wrong name
Date Thu, 04 Mar 2010 10:13:57 GMT

--- Comment #3 from Konstantin Kolinko <> 2010-03-04 10:13:54
UTC ---
Please note, that this field is something
It is used to implement NamingContext.isWritable(), and it is *not* exposed
through any public API.

(though it is accessible to subclasses because of being protected)

NamingContext.isWritable() is implemented as readOnlyContexts.containsKey(name)
where readOnlyContexts is some Hashtable.

Note that the exact name is checked for being in readOnlyContexts table, not
some prefix of it.

        Context newContext = new NamingContext(env,;
        bind(name, newContext);
means that the new context
1) is bound to the name 'name'
2) shares the property of being read-only with the current context, thus

Thus, the current code is correct.

The JavaDoc for property is
     * Name of the associated Catalina Context.
    protected String name;

It does not say that it is name of this context, but explicitly says that the
name belongs to another object.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message