Author: markt
Date: Tue Nov  5 00:08:25 2013
New Revision: 1538838

URL: http://svn.apache.org/r1538838
Log:
Simplify. Get the manifest via the resources implementation

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=1538838&r1=1538837&r2=1538838&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Tue Nov  
5 00:08:25 2013
@@ -161,30 +161,17 @@ public final class ExtensionValidator {
 
         // Primarily used for error reporting
         String jarName = null;
-        try {
-            WebResource[] jars = resources.listResources("/WEB-INF/lib");
-            for (WebResource jar : jars) {
-                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(jarName,
-                                jmanifest, ManifestResource.APPLICATION);
-                        appManifestResources.add(mre);
-                    }
-                }
-            }
-        } catch (IOException ioe) {
-            throw new IOException("Jar: " + jarName, ioe);
-        } finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (Throwable t) {
-                    ExceptionUtils.handleThrowable(t);
+        WebResource[] jars = resources.listResources("/WEB-INF/lib");
+        for (WebResource jar : jars) {
+            jarName = jar.getName();
+            if (jarName.toLowerCase(Locale.ENGLISH).endsWith(".jar") &&
+                    jar.isFile()) {
+
+                Manifest jmanifest = jar.getManifest();
+                if (jmanifest != null) {
+                    ManifestResource mre = new ManifestResource(jarName,
+                            jmanifest, ManifestResource.APPLICATION);
+                    appManifestResources.add(mre);
                 }
             }
         }



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

Reply via email to