You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/03/04 23:43:18 UTC
svn commit: r1664179 -
/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
Author: markt
Date: Wed Mar 4 22:43:17 2015
New Revision: 1664179
URL: http://svn.apache.org/r1664179
Log:
Revert unintentional change.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1664179&r1=1664178&r2=1664179&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java Wed Mar 4 22:43:17 2015
@@ -626,20 +626,17 @@ public class HostConfig
}
Context context = null;
- boolean isExternalWar = false;
- boolean isExternal = false;
try {
synchronized (digester) {
try {
context = (Context) digester.parse(contextXml);
- } catch (Exception e) {
- log.error(sm.getString(
- "hostConfig.deployDescriptor.error", file), e);
- } finally {
- digester.reset();
if (context == null) {
+ log.error(sm.getString("hostConfig.deployDescriptor.error",
+ file));
return;
}
+ } finally {
+ digester.reset();
}
}
if (context instanceof Lifecycle) {
@@ -651,6 +648,8 @@ public class HostConfig
context.setConfigFile(contextXml.getAbsolutePath());
context.setPath(contextPath);
// Add the associated docBase to the redeployed list if it's a WAR
+ boolean isExternalWar = false;
+ boolean isExternal = false;
if (context.getDocBase() != null) {
File docBase = new File(context.getDocBase());
if (!docBase.isAbsolute()) {
@@ -675,13 +674,8 @@ public class HostConfig
}
}
host.addChild(context);
- } catch (Throwable t) {
- log.error(sm.getString("hostConfig.deployDescriptor.error",
- file), t);
- } finally {
// Get paths for WAR and expanded WAR in appBase
String name = null;
- @SuppressWarnings("null")
String path = context.getPath();
if (path.equals("")) {
name = "ROOT";
@@ -732,9 +726,12 @@ public class HostConfig
(contextXml.getAbsolutePath(), new Long(contextXml.lastModified()));
}
}
+ } catch (Throwable t) {
+ log.error(sm.getString("hostConfig.deployDescriptor.error",
+ file), t);
}
-
- if (host.findChild(context.getName()) != null) {
+
+ if (context != null && host.findChild(context.getName()) != null) {
deployed.put(contextPath, deployedApp);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org