xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53681] New: [PATCH] Improve exception handling when loading classpath resources fails
Date Thu, 09 Aug 2012 06:21:11 GMT

          Priority: P2
            Bug ID: 53681
          Assignee: general@xmlgraphics.apache.org
           Summary: [PATCH] Improve exception handling when loading
                    classpath resources fails
          Severity: minor
    Classification: Unclassified
          Reporter: dominik.stadler@gmx.at
          Hardware: PC
            Status: NEW
           Version: 1.4
         Component: utilities
           Product: XMLGraphicsCommons

I had one invalid .jar file where signing information was not correct. XML
Graphics Commons 

When calling ClasspathResource.loadManifests(), via
ClasspathResource.getInstance(), it correctly fails with a
"java.lang.SecurityException: Invalid signature file digest for Manifest main
attributes", however it does not tell me which actual jar-file could not be

Please enhance exception handling in that method so that it reports which
jar-file failed, e.g. 

--- ClasspathResource.java      2010-07-02 14:04:28.000000000 +0200
+++ ClasspathResource.java.new  2012-08-09 08:20:21.428843500 +0200
@@ -138,6 +138,8 @@
                                 addToMapping(contentType, name, classLoader);
+                    } catch (SecurityException se) {
+                       throw new SecurityException("While handling " + u, se);
                     } catch (IOException io) {
                         // TODO: Log.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org

View raw message