I have been working on commons-naming (extracted from catalina's org.apache.naming, soon to be moved to incubator-directory) and I have discovered a (apparently harmless to tomcat) bug in the composeName() implementation that is repeated in o.a.n.NamingContext, o.a.n.SelectorContext, o.a.n.resources.BaseDirContext, and o.a.n.r.ProxyDirContext.

All of these classes include:

 public Name composeName(Name name, Name prefix)
        throws NamingException {
        prefix = (Name) name.clone();
        return prefix.addAll(name);
    }

This ignores the prefix and composes the name with itself. A grep on tomcat-4.0 and tomcat-catalina for 'composeName(' turns up nothing but the method declarations, so I assume that these methods are not used (at least directly) by tomcat.

Should I submit a patch to fix this? If yes, should I submit it against jakarta-tomcat-catalina? The fix that I have in mind is to replace the body with:

Name result = (Name) prefix.clone();
return result.addAll(name);

As we add more tests, we may find other things like this. Should we try to replicate the patches, or hold off until the incubator-directory-naming component is ready for a release and possible re-integration into tomcat?

Phil




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to