[ 
https://issues.apache.org/jira/browse/XGC-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luis Bernardo updated XGC-72:
-----------------------------
    Fix Version/s:     (was: --)

> [PATCH] Improve exception handling when loading classpath resources fails
> -------------------------------------------------------------------------
>
>                 Key: XGC-72
>                 URL: https://issues.apache.org/jira/browse/XGC-72
>             Project: XMLGraphicsCommons
>          Issue Type: Bug
>          Components: utilities
>    Affects Versions: 1.4
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Dominik Stadler
>            Assignee: XML Graphics Project Mailing List
>
> 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 
> loaded.
> 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.
>                      }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to