tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1197339 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Thu, 03 Nov 2011 22:50:50 GMT
Author: markt
Date: Thu Nov  3 22:50:50 2011
New Revision: 1197339

URL: http://svn.apache.org/viewvc?rev=1197339&view=rev
Log:
Check cast is safe

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=1197339&r1=1197338&r2=1197339&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Thu Nov  3 22:50:50 2011
@@ -660,7 +660,8 @@ public class ContextConfig
         String pathName = cn.getBaseName();
 
         boolean unpackWARs = true;
-        if (host instanceof StandardHost) {
+        if (host instanceof StandardHost &&
+                context instanceof StandardContext) {
             unpackWARs = ((StandardHost) host).isUnpackWARs() &&
                     ((StandardContext) context).getUnpackWAR() &&
                     (docBase.startsWith(host.getAppBaseFile().getPath()));



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


Mime
View raw message