tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1408164 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Mon, 12 Nov 2012 01:16:38 GMT
Author: markt
Date: Mon Nov 12 01:16:37 2012
New Revision: 1408164

URL: http://svn.apache.org/viewvc?rev=1408164&view=rev
Log:
Prevent ClassCastException when undeploying a FailedContext

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=1408164&r1=1408163&r2=1408164&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Nov 12 01:16:37 2012
@@ -1033,9 +1033,11 @@ public class ContextConfig implements Li
         }
 
         // Changed to getWorkPath per Bugzilla 35819.
-        String workDir = ((StandardContext) context).getWorkPath();
-        if (workDir != null) {
-            ExpandWar.delete(new File(workDir));
+        if (context instanceof StandardContext) {
+            String workDir = ((StandardContext) context).getWorkPath();
+            if (workDir != null) {
+                ExpandWar.delete(new File(workDir));
+            }
         }
     }
 



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


Mime
View raw message