tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1138573 - in /tomcat/trunk: java/org/apache/catalina/startup/Tomcat.java webapps/docs/changelog.xml
Date Wed, 22 Jun 2011 22:50:28 GMT
2011/6/22  <markt@apache.org>:
> Author: markt
> Date: Wed Jun 22 18:30:41 2011
> New Revision: 1138573
>
> URL: http://svn.apache.org/viewvc?rev=1138573&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51418
> Provide more control over Context creation when embedding Tomcat.
> Based on a patch by Benson Margulies.
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
>    tomcat/trunk/webapps/docs/changelog.xml
>

> +    public String noDefaultWebXmlPath() {
> +        return "org/apache/catalin/startup/NO_DEFAULT_XML";
> +    }

A typo in the above constant does not prevent it from working, but
somehow bugs me.

Searching for the string finds 4 places where it is used literally.

And now it becomes part of API.

Maybe
1) s/catalin/catalina/
2) add it to o.a.c.startup.Constants, e.g. named as NoDefaultWebXml
3) use the value to short-circuit
ContextConfig#getWebXmlSource(defaultWebXml, baseDir) to return null

An alternative to 2)+3) is to put the constant into
DefaultWebXmlListener, but I like 2)+3) better.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message