You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/09/12 23:56:47 UTC
svn commit: r1624657 -
/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Author: kkolinko
Date: Fri Sep 12 21:56:47 2014
New Revision: 1624657
URL: http://svn.apache.org/r1624657
Log:
Reorganize branches for better performance.
The "docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") && !file.isDirectory()" condition was the same in both branches.
Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1624657&r1=1624656&r2=1624657&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Fri Sep 12 21:56:47 2014
@@ -612,19 +612,20 @@ public class ContextConfig implements Li
}
}
- if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") && !file.isDirectory() && unpackWARs) {
- URL war = new URL("jar:" + (new File(docBase)).toURI().toURL() + "!/");
- docBase = ExpandWar.expand(host, war, pathName);
- file = new File(docBase);
- docBase = file.getCanonicalPath();
- if (context instanceof StandardContext) {
- ((StandardContext) context).setOriginalDocBase(origDocBase);
- }
- } else if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") &&
- !file.isDirectory() && !unpackWARs) {
- URL war =
- new URL("jar:" + (new File (docBase)).toURI().toURL() + "!/");
- ExpandWar.validate(host, war, pathName);
+ if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") && !file.isDirectory()) {
+ if (unpackWARs) {
+ URL war = new URL("jar:" + (new File(docBase)).toURI().toURL() + "!/");
+ docBase = ExpandWar.expand(host, war, pathName);
+ file = new File(docBase);
+ docBase = file.getCanonicalPath();
+ if (context instanceof StandardContext) {
+ ((StandardContext) context).setOriginalDocBase(origDocBase);
+ }
+ } else {
+ URL war =
+ new URL("jar:" + (new File (docBase)).toURI().toURL() + "!/");
+ ExpandWar.validate(host, war, pathName);
+ }
} else {
File docDir = new File(docBase);
if (!docDir.exists()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org