Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73355D7AC for ; Wed, 2 Jan 2013 21:48:33 +0000 (UTC) Received: (qmail 22569 invoked by uid 500); 2 Jan 2013 21:48:32 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 22506 invoked by uid 500); 2 Jan 2013 21:48:32 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 22495 invoked by uid 99); 2 Jan 2013 21:48:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2013 21:48:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2013 21:48:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 20EBA23888CD for ; Wed, 2 Jan 2013 21:48:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1428079 - /tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Date: Wed, 02 Jan 2013 21:48:10 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130102214810.20EBA23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Wed Jan 2 21:48:09 2013 New Revision: 1428079 URL: http://svn.apache.org/viewvc?rev=1428079&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54256 Give the developer a hint as to which JAR file has the broken manifest Modified: tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Modified: tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java?rev=1428079&r1=1428078&r2=1428079&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java (original) +++ tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Wed Jan 2 21:48:09 2013 @@ -159,23 +159,26 @@ public final class ExtensionValidator { } } + // Primarily used for error reporting + String jarName = null; try { WebResource[] jars = resources.listResources("/WEB-INF/lib"); for (WebResource jar : jars) { - if (jar.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar") && + jarName = jar.getName(); + if (jarName.toLowerCase(Locale.ENGLISH).endsWith(".jar") && jar.isFile()) { inputStream = jar.getInputStream(); Manifest jmanifest = getManifest(inputStream); if (jmanifest != null) { - ManifestResource mre = new ManifestResource( - jar.getName(), - jmanifest, - ManifestResource.APPLICATION); + ManifestResource mre = new ManifestResource(jarName, + jmanifest, ManifestResource.APPLICATION); appManifestResources.add(mre); } } } + } catch (IOException ioe) { + throw new IOException("Jar: " + jarName, ioe); } finally { if (inputStream != null) { try { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org