diff --git a/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java b/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java index 3802032..4e435b5 100644 --- a/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java +++ b/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java @@ -75,7 +75,7 @@ String pathInJar = getInternalPath() + path.substring(webAppMount.length()); // Always strip off the leading '/' to get the JAR path - if (pathInJar.charAt(0) == '/') { + if (pathInJar.length() > 0 && pathInJar.charAt(0) == '/') { pathInJar = pathInJar.substring(1); } Iterator entries = jarFileEntries.keySet().iterator();