JARs without any web.xml fragments should not impact the status of distributable
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 11 Dec 2009 17:04:36 +0000 (17:04 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 11 Dec 2009 17:04:36 +0000 (17:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@889701 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/ContextConfig.java

index 0b2cc1a..877b356 100644 (file)
@@ -1866,7 +1866,11 @@ public class ContextConfig
                 jarFile = urlConn.getJarFile();
                 JarEntry fragmentEntry =
                     jarFile.getJarEntry(FRAGMENT_LOCATION);
-                if (fragmentEntry != null) {
+                if (fragmentEntry == null) {
+                    // If there is no web.xml, normal JAR no impact on
+                    // distributable
+                    fragment.setDistributable(true);
+                } else {
                     stream = jarFile.getInputStream(fragmentEntry);
                     InputSource source = new InputSource(
                             urlConn.getJarFileURL().toString() +